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
|
@ -166,23 +166,21 @@ load(void)
|
|||
|
||||
switch (type) {
|
||||
case EF_PLANE:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_plane_ship(§, &ship, noisy, load_unload,
|
||||
&nships)))
|
||||
retval = load_plane_ship(§, &ship, noisy, load_unload,
|
||||
&nships);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
break;
|
||||
case EF_LAND:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_land_ship(§, &ship, noisy, load_unload,
|
||||
&nships)))
|
||||
retval = load_land_ship(§, &ship, noisy, load_unload,
|
||||
&nships);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
break;
|
||||
case EF_SECTOR:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_comm_ship(§, &ship, ich, load_unload, &nships)))
|
||||
retval = load_comm_ship(§, &ship, ich, load_unload,
|
||||
&nships);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
}
|
||||
/* load/unload plague */
|
||||
|
@ -281,23 +279,21 @@ lload(void)
|
|||
|
||||
switch (type) {
|
||||
case EF_LAND:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_land_land(§, &land, noisy, load_unload,
|
||||
&nunits)))
|
||||
retval = load_land_land(§, &land, noisy, load_unload,
|
||||
&nunits);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
break;
|
||||
case EF_PLANE:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_plane_land(§, &land, noisy, load_unload,
|
||||
&nunits)))
|
||||
retval = load_plane_land(§, &land, noisy, load_unload,
|
||||
&nunits);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
break;
|
||||
case EF_SECTOR:
|
||||
if (0 !=
|
||||
(retval =
|
||||
load_comm_land(§, &land, ich, load_unload, &nunits)))
|
||||
retval = load_comm_land(§, &land, ich, load_unload,
|
||||
&nunits);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
}
|
||||
/* load/unload plague */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue