From: nhmall Date: Sat, 21 Apr 2018 10:57:52 +0000 (-0400) Subject: clean up some code pasted from other function X-Git-Tag: NetHack-3.6.1_RC01~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b938808ff05583ad224376f1f0ecd1edc7bd8baf;p=nethack clean up some code pasted from other function --- diff --git a/src/trap.c b/src/trap.c index b664ac56d..32128b966 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4929,12 +4929,7 @@ struct trap *adjtrap; for (idx = 0; idx < 8; idx++) { if (xdir[idx] == u.dx && ydir[idx] == u.dy) - break; - } - /* idx is valid if < 8 */ - if (idx < 8) { - int adjidx = (idx + 4) % 8; - return TRUE; + return TRUE; } return FALSE; }