github PR #694 - redundant null check
Pull request from argrath: a check for null trap in untrap_prob() comes after an unconditional use of that trap so doesn't server any useful purpose. Redo a couple of comments too. No fixes entry necessary. Closes #694
This commit is contained in:
+3
-3
@@ -4463,12 +4463,12 @@ dountrap(void)
|
|||||||
|
|
||||||
/* Probability of disabling a trap. Helge Hafting */
|
/* Probability of disabling a trap. Helge Hafting */
|
||||||
static int
|
static int
|
||||||
untrap_prob(struct trap *ttmp)
|
untrap_prob(
|
||||||
|
struct trap *ttmp) /* must not be Null */
|
||||||
{
|
{
|
||||||
int chance = 3;
|
int chance = 3;
|
||||||
|
|
||||||
/* Only spiders know how to deal with webs reliably */
|
/* non-spiders are less adept at dealing with webs */
|
||||||
/* Assume ttmp is not NULL */
|
|
||||||
if (ttmp->ttyp == WEB && !webmaker(g.youmonst.data))
|
if (ttmp->ttyp == WEB && !webmaker(g.youmonst.data))
|
||||||
chance = 7; /* 3.7: used to be 30 */
|
chance = 7; /* 3.7: used to be 30 */
|
||||||
if (Confusion || Hallucination)
|
if (Confusion || Hallucination)
|
||||||
|
|||||||
Reference in New Issue
Block a user