Don't use 0 as null pointer constant, part 3
This part replaces E == 0 by !E, where E has pointer type.
This commit is contained in:
parent
90f8f2b099
commit
6ae4eca045
79 changed files with 121 additions and 121 deletions
|
@ -102,7 +102,7 @@ do_treaty(void)
|
|||
theircond = 0;
|
||||
for (tfp = treaty_flags; tfp && tfp->name; tfp++) {
|
||||
sprintf(prompt, "%s? ", tfp->name);
|
||||
if ((cp = getstring(prompt, buf)) == 0)
|
||||
if (!(cp = getstring(prompt, buf)))
|
||||
return RET_FAIL;
|
||||
if (*cp == 'y')
|
||||
theircond |= tfp->value;
|
||||
|
@ -111,7 +111,7 @@ do_treaty(void)
|
|||
ourcond = 0;
|
||||
for (tfp = treaty_flags; tfp && tfp->name; tfp++) {
|
||||
sprintf(prompt, "%s? ", tfp->name);
|
||||
if ((cp = getstring(prompt, buf)) == 0)
|
||||
if (!(cp = getstring(prompt, buf)))
|
||||
return RET_FAIL;
|
||||
if (*cp == 'y')
|
||||
ourcond |= tfp->value;
|
||||
|
@ -121,7 +121,7 @@ do_treaty(void)
|
|||
return RET_SYN;
|
||||
}
|
||||
cp = getstring("Proposed treaty duration? (days) ", buf);
|
||||
if (cp == 0)
|
||||
if (!cp)
|
||||
return RET_FAIL;
|
||||
j = atoi(cp);
|
||||
if (j <= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue