Clean up unreadable assignments within if conditionals

Pinpointed assignments within if conditionals with spatch -sp_file
tests/bad_assign.cocci (from coccinelle-0.1.4).  Cherry-picked diff
hunks affecting conditionals split over multiple lines, and cleaned
them up.
This commit is contained in:
Markus Armbruster 2009-03-21 09:24:45 +01:00
parent 7c6e56bd02
commit 57717b5bc1
15 changed files with 75 additions and 75 deletions

View file

@ -61,8 +61,9 @@ demo(void)
if (!(p = getstarg(player->argp[2], "Number to de-mobilize : ", buf)))
return RET_SYN;
number = atoi(p);
if (!(p = getstarg(player->argp[3],
"New civilians on active reserve? (y/n) ", buf)))
p = getstarg(player->argp[3],
"New civilians on active reserve? (y/n) ", buf);
if (!p)
return RET_SYN;
if (*p != 'y' && *p != 'n')
return RET_SYN;