From: nethack.rankin Date: Fri, 10 Jan 2003 03:44:09 +0000 (+0000) Subject: another lint bit X-Git-Tag: MOVE2GIT~2247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62700747c8e2ed94190110127591bb59fa5ce8ad;p=nethack another lint bit The heros_fault() macro added to region.h relatively recently causes a K&R vintage compiler to choke on the heros_fault variable in dothrow.c. Although the latter has been around longer, changing it was a little bit simpler. --- diff --git a/src/dothrow.c b/src/dothrow.c index 28a61d90a..8eeea3dfb 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1483,19 +1483,17 @@ xchar x, y; /* object location (ox, oy may not be right) */ /* * Unconditionally break an object. Assumes all resistance checks * and break messages have been delivered prior to getting here. - * This routine assumes the cause is the hero if heros_fault is TRUE. - * */ STATIC_OVL void -breakobj(obj, x, y, heros_fault, from_invent) +breakobj(obj, x, y, hero_caused, from_invent) struct obj *obj; xchar x, y; /* object location (ox, oy may not be right) */ -boolean heros_fault; +boolean hero_caused; /* is this the hero's fault? */ boolean from_invent; { switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { case MIRROR: - if (heros_fault) + if (hero_caused) change_luck(-2); break; case POT_WATER: /* really, all potions */ @@ -1522,11 +1520,11 @@ boolean from_invent; break; case EGG: /* breaking your own eggs is bad luck */ - if (heros_fault && obj->spe && obj->corpsenm >= LOW_PM) + if (hero_caused && obj->spe && obj->corpsenm >= LOW_PM) change_luck((schar) -min(obj->quan, 5L)); break; } - if (heros_fault) { + if (hero_caused) { if (from_invent) { if (*u.ushops) check_shop_obj(obj, x, y, TRUE);