From: nhmall Date: Thu, 18 Aug 2022 01:16:23 +0000 (-0400) Subject: redundant code warning line 400 src/apply.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef6fde88ea7e6422242a9e65b552691226061573;p=nethack redundant code warning line 400 src/apply.c if (odummy->otyp == SLIME_MOLD 400 -> && has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM) The definition of has_mcorpsenm macro is: include/mextra.h:#define has_mcorpsenm(mon) ((mon)->mextra && MCORPSENM(mon) != NON_PM) Remove the redundant code. --- diff --git a/src/apply.c b/src/apply.c index ad7ea0dd6..09da24177 100644 --- a/src/apply.c +++ b/src/apply.c @@ -396,8 +396,7 @@ use_stethoscope(struct obj *obj) /* simple_typename() yields "fruit" for any named fruit; we want the same thing '//' or ';' shows: "slime mold" or "grape" or "slice of pizza" */ - if (odummy->otyp == SLIME_MOLD - && has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM) { + if (odummy->otyp == SLIME_MOLD && has_mcorpsenm(mtmp)) { odummy->spe = MCORPSENM(mtmp); what = simpleonames(odummy); } else {