Remove silly superflous parenthesis.
This commit is contained in:
parent
e59c4bcfd0
commit
e29f288289
8 changed files with 23 additions and 23 deletions
|
@ -314,9 +314,9 @@ gen_power(void)
|
|||
else
|
||||
pow->p_power = pow->p_power * (1.0 / 500.0);
|
||||
/* ack. add this vec to the "world power" element */
|
||||
f_pt2 = &(powbuf[0].p_sects);
|
||||
f_ptr = &(pow->p_sects);
|
||||
while (f_ptr <= &(pow->p_power)) {
|
||||
f_pt2 = &powbuf[0].p_sects;
|
||||
f_ptr = &pow->p_sects;
|
||||
while (f_ptr <= &pow->p_power) {
|
||||
*f_pt2 += *f_ptr;
|
||||
f_pt2++;
|
||||
f_ptr++;
|
||||
|
|
|
@ -128,7 +128,7 @@ verify_row(int type, int row)
|
|||
}
|
||||
if (!in_mem)
|
||||
free(row_ref);
|
||||
return(ret_val);
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -271,8 +271,8 @@ bp_realcost(struct as_coord from, struct as_coord to, s_char *pp)
|
|||
static double
|
||||
bp_seccost(struct as_coord from, struct as_coord to, s_char *pp)
|
||||
{
|
||||
return ((double)mapdist((coord)from.x, (coord)from.y,
|
||||
(coord)to.x, (coord)to.y));
|
||||
return (double)mapdist((coord)from.x, (coord)from.y,
|
||||
(coord)to.x, (coord)to.y);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -374,10 +374,10 @@ lwpInitContext(struct lwpProc *newp, void *sp)
|
|||
void
|
||||
lwpInitContext(struct lwpProc *newp, stack_t *spp)
|
||||
{
|
||||
getcontext(&(newp->context));
|
||||
getcontext(&newp->context);
|
||||
newp->context.uc_stack.ss_sp = spp->ss_sp;
|
||||
newp->context.uc_stack.ss_size = spp->ss_size;
|
||||
makecontext(&(newp->context), lwpEntryPoint, 0);
|
||||
makecontext(&newp->context, lwpEntryPoint, 0);
|
||||
}
|
||||
|
||||
#elif defined(ALPHA)
|
||||
|
|
|
@ -1004,7 +1004,7 @@ ac_flak_dam(int flak)
|
|||
dam = (int)((roll(8) + 2) * mult);
|
||||
if (dam > 100)
|
||||
dam = 100;
|
||||
return(dam);
|
||||
return dam;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -41,7 +41,7 @@ landgun(int effic, int guns)
|
|||
double g = (double)min(guns, 7);
|
||||
|
||||
d = ((double)(random() % 30) + 20.0) * ((double)g / 7.0);
|
||||
d *= ((double)effic);
|
||||
d *= (double)effic;
|
||||
d /= 100.0;
|
||||
return d;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ seagun(int effic, int guns)
|
|||
d = 0.0;
|
||||
while (guns--)
|
||||
d += 10.0 + (double)(random() % 6);
|
||||
d *= ((double)effic) * 0.01;
|
||||
d *= (double)effic * 0.01;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,9 @@ landunitgun(int effic, int shots, int guns, int ammo, int shells)
|
|||
shots = min(shots, guns);
|
||||
while (shots-- > 0)
|
||||
d += 5.0 + (double)(random() % 6);
|
||||
d *= ((double)effic) * 0.01;
|
||||
d *= (double)effic * 0.01;
|
||||
if (shells < ammo && ammo != 0)
|
||||
d *= (double)((double)shells / (double)ammo);
|
||||
d *= (double)shells / (double)ammo;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -77,9 +77,9 @@ roundrange(double r)
|
|||
{
|
||||
double f;
|
||||
|
||||
f = r - ((int)r);
|
||||
f = r - (int)r;
|
||||
if (chance(f))
|
||||
return ((int)r) + 1;
|
||||
return (int)r + 1;
|
||||
else
|
||||
return (int)r;
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
|
|||
s_char orig;
|
||||
int mob;
|
||||
|
||||
taken = lnd_getmil(&(llp->land));
|
||||
taken = lnd_getmil(&llp->land);
|
||||
/* Spies always die */
|
||||
if (llp->lcp->l_flags & L_SPY) {
|
||||
eff_eq = 100;
|
||||
|
@ -197,7 +197,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
|
|||
eff_eq =
|
||||
ldround((((double)cas * 100.0) / (double)llp->lcp->l_mil), 1);
|
||||
llp->land.lnd_effic -= eff_eq;
|
||||
lnd_submil(&(llp->land), cas);
|
||||
lnd_submil(&llp->land, cas);
|
||||
}
|
||||
|
||||
if (llp->land.lnd_effic < LAND_MINEFF) {
|
||||
|
@ -209,7 +209,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
|
|||
return taken;
|
||||
} else {
|
||||
/* Ok, now, how many did we take off? (sould be the diff) */
|
||||
taken = taken - lnd_getmil(&(llp->land));
|
||||
taken = taken - lnd_getmil(&llp->land);
|
||||
}
|
||||
|
||||
if (llp->land.lnd_effic >= llp->land.lnd_retreat)
|
||||
|
@ -1127,9 +1127,9 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
|
|||
}
|
||||
/* Note we check would_abandon first because we don't want
|
||||
to always have to do these checks */
|
||||
if (would_abandon(&osect, I_CIVIL, 0, &(llp->land))) {
|
||||
if (would_abandon(&osect, I_CIVIL, 0, &llp->land)) {
|
||||
stop = 0;
|
||||
if (!want_to_abandon(&osect, I_CIVIL, 0, &(llp->land))) {
|
||||
if (!want_to_abandon(&osect, I_CIVIL, 0, &llp->land)) {
|
||||
stop = 1;
|
||||
}
|
||||
/* now check stuff */
|
||||
|
@ -1138,7 +1138,7 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
|
|||
if (!check_sect_ok(&osect))
|
||||
return 1;
|
||||
for (qp2 = list->q_back; qp2 != list; qp2 = qp2->q_back) {
|
||||
if (!check_land_ok(&(((struct llist *)qp2)->land)))
|
||||
if (!check_land_ok(&((struct llist *)qp2)->land))
|
||||
return 1;
|
||||
}
|
||||
if (stop) {
|
||||
|
|
|
@ -292,7 +292,7 @@ nav_ship(struct shpstr *sp)
|
|||
|
||||
/* We need to free the ship list */
|
||||
qp = ship_list.q_forw;
|
||||
while (qp != &(ship_list)) {
|
||||
while (qp != &ship_list) {
|
||||
newqp = qp->q_forw;
|
||||
emp_remque(qp);
|
||||
free(qp);
|
||||
|
@ -338,7 +338,7 @@ nav_ship(struct shpstr *sp)
|
|||
|
||||
/* We need to free the ship list (just in case) */
|
||||
qp = ship_list.q_forw;
|
||||
while (qp != &(ship_list)) {
|
||||
while (qp != &ship_list) {
|
||||
newqp = qp->q_forw;
|
||||
emp_remque(qp);
|
||||
free(qp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue