From 079e7ed9d05b5f80f5106a164762ad1d39e64c92 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 5 Dec 2015 22:03:20 +0100 Subject: Removed some unnecessary assertions - Follow-up to 81e0257 Signed-off-by: Haru --- src/map/homunculus.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/map/homunculus.c') diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 2490bc659..8d529ea01 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -49,10 +49,9 @@ struct homunculus_interface *homun; //Returns the viewdata for homunculus struct view_data* homunculus_get_viewdata(int class_) { - Assert_retr(NULL, class_ >= HM_CLASS_BASE && class_ - HM_CLASS_BASE < MAX_HOMUNCULUS_CLASS); - if (homdb_checkid(class_)) - return &homun->dbs->viewdb[class_-HM_CLASS_BASE]; - return NULL; + Assert_retr(NULL, homdb_checkid(class_)); + + return &homun->dbs->viewdb[class_-HM_CLASS_BASE]; } enum homun_type homunculus_class2type(int class_) { @@ -127,7 +126,6 @@ int homunculus_dead(struct homun_data *hd) { nullpo_retr(3, hd); sd = hd->master; - nullpo_retr(3, sd); clif->emotion(&hd->bl, E_WAH); //Delete timers when dead. -- cgit v1.2.3-60-g2f50