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:
parent
7c6e56bd02
commit
57717b5bc1
15 changed files with 75 additions and 75 deletions
|
@ -709,29 +709,29 @@ att_ask_support(int offset, int *fortp, int *shipp, int *landp,
|
|||
*fortp = *shipp = 0;
|
||||
*landp = *planep = 0;
|
||||
|
||||
if (!(p = getstarg(player->argp[offset], "Use fort support? ",
|
||||
buf)))
|
||||
p = getstarg(player->argp[offset], "Use fort support? ", buf);
|
||||
if (!p)
|
||||
return RET_SYN;
|
||||
|
||||
if ((*p == 'y') || (*p == 'Y'))
|
||||
*fortp = 1;
|
||||
|
||||
if (!(p = getstarg(player->argp[offset + 1], "Use ship support? ",
|
||||
buf)))
|
||||
p = getstarg(player->argp[offset + 1], "Use ship support? ", buf);
|
||||
if (!p)
|
||||
return RET_SYN;
|
||||
|
||||
if ((*p == 'y') || (*p == 'Y'))
|
||||
*shipp = 1;
|
||||
|
||||
if (!(p = getstarg(player->argp[offset + 2], "Use land support? ",
|
||||
buf)))
|
||||
p = getstarg(player->argp[offset + 2], "Use land support? ", buf);
|
||||
if (!p)
|
||||
return RET_SYN;
|
||||
|
||||
if ((*p == 'y') || (*p == 'Y'))
|
||||
*landp = 1;
|
||||
|
||||
if (!(p = getstarg(player->argp[offset + 3], "Use plane support? ",
|
||||
buf)))
|
||||
p = getstarg(player->argp[offset + 3], "Use plane support? ", buf);
|
||||
if (!p)
|
||||
return RET_SYN;
|
||||
|
||||
if ((*p == 'y') || (*p == 'Y'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue