Don't use 0 as null pointer constant, part 2
This part replaces E != 0 by E, where E has pointer type.
This commit is contained in:
parent
615681ce16
commit
90f8f2b099
15 changed files with 23 additions and 24 deletions
|
@ -52,7 +52,7 @@ comtch(char *command, struct cmndstr *coms, int comstat)
|
|||
if (command == 0 || *command == 0)
|
||||
return M_IGNORE;
|
||||
status = M_NOTFOUND;
|
||||
for (com = coms; com->c_form != 0; com++) {
|
||||
for (com = coms; com->c_form; com++) {
|
||||
if ((com->c_permit & comstat) != com->c_permit)
|
||||
continue;
|
||||
switch (mineq(command, com->c_form)) {
|
||||
|
|
|
@ -58,11 +58,11 @@ direrr(char *stop_msg, char *view_msg, char *map_msg)
|
|||
pr(" %c %c\n", dirch[DIR_UL], dirch[DIR_UR]);
|
||||
pr("%c %c\n", dirch[DIR_L], dirch[DIR_R]);
|
||||
pr(" %c %c\n", dirch[DIR_DL], dirch[DIR_DR]);
|
||||
if (stop_msg != 0)
|
||||
if (stop_msg)
|
||||
pr(stop_msg, dirch[DIR_STOP]);
|
||||
if (view_msg != 0)
|
||||
if (view_msg)
|
||||
pr(view_msg, dirch[DIR_VIEW]);
|
||||
if (map_msg != 0)
|
||||
if (map_msg)
|
||||
pr(map_msg, dirch[DIR_MAP]);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ sarg_type(char *str)
|
|||
return NS_DIST;
|
||||
if (c == '*')
|
||||
return NS_ALL;
|
||||
if (c == '#' || strchr(str, ',') != 0)
|
||||
if (c == '#' || strchr(str, ','))
|
||||
return NS_AREA;
|
||||
if (isdigit(c))
|
||||
return NS_LIST;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue