Remove some redundant parenthesis; no functional change.

This commit is contained in:
Markus Armbruster 2005-07-23 19:48:35 +00:00
parent 4861f837fb
commit 380b063f9c
41 changed files with 134 additions and 134 deletions

View file

@ -2181,7 +2181,7 @@ take_casualty(int combat_mode, struct combat *off, struct emp_qelem *olist)
}
if (QEMPTY(olist))
return (CASUALTY_LUMP - to_take);
return CASUALTY_LUMP - to_take;
/*
* Need to take some casualties from attacking units
@ -2199,11 +2199,11 @@ take_casualty(int combat_mode, struct combat *off, struct emp_qelem *olist)
}
}
if (biggest == (struct emp_qelem *)0)
return (CASUALTY_LUMP - to_take);
return CASUALTY_LUMP - to_take;
llp = (struct llist *)biggest;
cas = lnd_take_casualty(combat_mode, llp, to_take);
return (CASUALTY_LUMP - (to_take - cas));
return CASUALTY_LUMP - (to_take - cas);
}
/* Send reacting defense units back to where they came from (at no mob cost) */
@ -2594,16 +2594,14 @@ take_move_in_mob(int combat_mode, struct llist *llp, struct combat *off,
if (off->shp_mcp->m_flags & M_LAND) {
if (llp->lcp->l_flags & L_MARINE)
llp->land.lnd_mobil -=
((float)etu_per_update * land_mob_scale * 0.5);
(float)etu_per_update * land_mob_scale * 0.5;
else
llp->land.lnd_mobil -= ((float)etu_per_update
* land_mob_scale);
llp->land.lnd_mobil -= (float)etu_per_update * land_mob_scale;
} else {
if (llp->lcp->l_flags & L_MARINE)
llp->land.lnd_mobil = 0;
else
llp->land.lnd_mobil = (((float)etu_per_update
* land_mob_scale) * (-1));
llp->land.lnd_mobil = -(float)etu_per_update * land_mob_scale;
}
break;
case A_BOARD:

View file

@ -141,7 +141,7 @@ sd(natid att, natid own, coord x, coord y, int noisy, int defending,
}
}
}
return (int)100 - (eff * 100);
return (int)100 - eff * 100;
}
int

View file

@ -79,7 +79,7 @@ roundrange(double r)
f = r - ((int)r);
if (chance(f))
return (((int)r) + 1);
return ((int)r) + 1;
else
return ((int)r);
return (int)r;
}

View file

@ -130,7 +130,7 @@ defense_val(struct lndstr *lp)
if (value < 1.0 && men > 0 && !(lcp->l_flags & L_SPY))
return 1;
return (int)(value);
return (int)value;
}
int
@ -188,8 +188,6 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
s_char orig;
int mob;
taken = lnd_getmil(&(llp->land));
/* Spies always die */
if (llp->lcp->l_flags & L_SPY) {
@ -274,7 +272,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
orig = llp->land.lnd_mobil;
llp->land.lnd_mobil = (s_char)mob;
if (llp->land.lnd_mobil > orig)
llp->land.lnd_mobil = (-127);
llp->land.lnd_mobil = -127;
sprintf(buf, "retreats at %d%% efficiency to %s!",
llp->land.lnd_effic,
xyas(bx, by, llp->land.lnd_own));
@ -346,9 +344,9 @@ int
lnd_spyval(struct lndstr *lp)
{
if (lchr[(int)lp->lnd_type].l_flags & L_RECON)
return (lp->lnd_spy * (lp->lnd_effic / 100.0)) + 2;
return lp->lnd_spy * (lp->lnd_effic / 100.0) + 2;
else
return (lp->lnd_spy * (lp->lnd_effic / 100.0));
return lp->lnd_spy * (lp->lnd_effic / 100.0);
}
int

View file

@ -306,7 +306,7 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget,
if (icount == 0) {
if (sect.sct_own != 0)
mpr(sect.sct_own, "No %ss launched to intercept.\n", def_name);
return (destroyed);
return destroyed;
}
/* attempt to destroy incoming missile */
@ -359,7 +359,7 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget,
free(qp);
}
if (destroyed)
return (destroyed);
return destroyed;
if (icount) {
mpr(bombown, "%s made it through %s defenses!\n", att_name,
def_name);
@ -367,7 +367,7 @@ msl_intercept(coord x, coord y, natid bombown, int hardtarget,
mpr(sect.sct_own, "%s made it through %s defenses!\n",
att_name, def_name);
}
return (destroyed);
return destroyed;
}
/* Keep launching missiles on list until mindam damage has been done */

View file

@ -347,11 +347,11 @@ findcondition(s_char code)
x = 0;
while (conditions[x].code) {
if (conditions[x].code == code)
return (x);
return x;
x++;
}
return (x);
return x;
}
int