]> git.pond.sub.org Git - empserver/commitdiff
Remove silly superflous parenthesis.
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 3 Dec 2005 21:14:26 +0000 (21:14 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 3 Dec 2005 21:14:26 +0000 (21:14 +0000)
src/lib/commands/powe.c
src/lib/common/ef_verify.c
src/lib/common/path.c
src/lib/lwp/arch.c
src/lib/subs/aircombat.c
src/lib/subs/landgun.c
src/lib/subs/lndsub.c
src/lib/update/nav_ship.c

index 8011ad1ae4d95a2d89695c54bdd98f552dffe41f..8d5edf2695707924ef071bd5f21990a22d7d3f13 100644 (file)
@@ -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++;
index f78d6dd86bd0add2809de4f92f58d1a157c76aa2..937e3ffae56c3de2482332f7528a1877c5a510fc 100644 (file)
@@ -128,7 +128,7 @@ verify_row(int type, int row)
     } 
     if (!in_mem)
         free(row_ref);
-    return(ret_val);
+    return ret_val;
 }
 
 int
index a1317fad97632d9055b9271dcb8f0d4479666eac..142c26ff280fc51fa45bb27d21ab4ad1315beefd 100644 (file)
@@ -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);
 }
 
 /*
index 75282412f2ac3ba21aa0441c9e41df8cbbf0cad6..6d211b817abd224bd39b7d37db9df581e09f327e 100644 (file)
@@ -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)
index f0ca0d547b51b733b6a50e8b555d9e672786f97b..3591b83b67d7376021af37f7d56a6406a5d844f5 100644 (file)
@@ -1004,7 +1004,7 @@ ac_flak_dam(int flak)
     dam = (int)((roll(8) + 2) * mult);
     if (dam > 100)
        dam = 100;
-    return(dam);
+    return dam;
 }
 
 /*
index 750184fc4d02a40c9f3534a1b5fd4aab3edb9b24..cbef72ecaa096d38004e5358d9b944c16c40a3a5 100644 (file)
@@ -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;
 }
index 19aa016734c7ee6c599aa01b2a0b56b0ae2fa99b..ab6018349da6ad1ac128b24832d6d29b25930c86 100644 (file)
@@ -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) {
index 6353b00864f76c49443fff39c76d2ebd318c2fb4..d7716e845ecca23bfb95a2fbcf725a8722a7f038 100644 (file)
@@ -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);