]> granicus.if.org Git - nethack/commitdiff
lint bit: protects(artifact.c) (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 12 Jan 2012 09:51:05 +0000 (09:51 +0000)
committernethack.rankin <nethack.rankin>
Thu, 12 Jan 2012 09:51:05 +0000 (09:51 +0000)
     Rename 'is_worn' argument; that's also the name of a function.

src/artifact.c

index de156fd36563a26355500800024b7e4e2e35d912..035f04a917597d28ee5e84094aeda4f22856ef83 100644 (file)
@@ -419,18 +419,18 @@ struct obj *otmp;
 
 /* determine whether an item confers Protection */
 boolean
-protects(otmp, is_worn)
+protects(otmp, being_worn)
 struct obj *otmp;
-boolean is_worn;
+boolean being_worn;
 {
        const struct artifact *arti;
 
-       if (is_worn && objects[otmp->otyp].oc_oprop == PROTECTION)
+       if (being_worn && objects[otmp->otyp].oc_oprop == PROTECTION)
            return TRUE;
        arti = get_artifact(otmp);
        if (!arti) return FALSE;
        return (arti->cspfx & SPFX_PROTECT) != 0 ||
-               (is_worn && (arti->spfx & SPFX_PROTECT) != 0);
+               (being_worn && (arti->spfx & SPFX_PROTECT) != 0);
 }
 
 /*