]> diplodocus.org Git - nmh/commitdiff
Remove more outer wrapping parenthesis from return statements.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 23:14:43 +0000 (00:14 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 23:14:43 +0000 (00:14 +0100)
For example, `return(foo(a, b));' becomes `return foo(a, b);'.

23 files changed:
mts/smtp/smtp.c
sbr/dtime.c
sbr/dtimep.l
sbr/folder_delmsgs.c
sbr/lock_file.c
sbr/m_convert.c
sbr/pidwait.c
sbr/read_yes_or_no_if_tty.c
sbr/refile.c
sbr/seq_list.c
sbr/vfgets.c
uip/dropsbr.c
uip/fmtdump.c
uip/fmttest.c
uip/mhbuildsbr.c
uip/mhshowsbr.c
uip/mhstoresbr.c
uip/popsbr.c
uip/post.c
uip/prompter.c
uip/scansbr.c
uip/slocal.c
uip/sortm.c

index 80dabb7831ead6f2c274ee51e17673609c121bd7..f8478427a35a2f8c745971446c3ccaa5af90f549 100644 (file)
@@ -533,7 +533,7 @@ sm_wtxt (char *buffer, int len)
 
     result = sm_wstream (buffer, len);
 
 
     result = sm_wstream (buffer, len);
 
-    return (result == NOTOK ? RP_BHST : RP_OK);
+    return result == NOTOK ? RP_BHST : RP_OK;
 }
 
 
 }
 
 
@@ -632,7 +632,7 @@ sm_end (int type)
        status = OK;
     }
 
        status = OK;
     }
 
-    return (status ? RP_BHST : RP_OK);
+    return status ? RP_BHST : RP_OK;
 }
 
 
 }
 
 
index f661ed14f82b93b32d9b15861c2c299c732fc34a..b5039ed6d96c0c6987ffb8c03bb6578cd8ab1bde 100644 (file)
@@ -408,6 +408,6 @@ twsort (struct tws *tw1, struct tws *tw2)
     if (tw2->tw_clock == 0)
        dmktime (tw2);
 
     if (tw2->tw_clock == 0)
        dmktime (tw2);
 
-    return ((c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1
-           : c1 == c2 ? 0 : -1);
+    return (c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1
+           : c1 == c2 ? 0 : -1;
 }
 }
index 9053708802a2a64c9c34988ff2d5e9e03f7d6411..09a579f9991afcd393e56b45913719c07bd74f28 100644 (file)
@@ -51,7 +51,7 @@
     tw.tw_year += 1900; \
   if(tw.tw_year < 1970) \
     tw.tw_year += 100; \
     tw.tw_year += 1900; \
   if(tw.tw_year < 1970) \
     tw.tw_year += 100; \
-  return(&tw)
+  return &tw
 
 /*
  * Table to convert month names to numeric month.  We use the
 
 /*
  * Table to convert month names to numeric month.  We use the
index e5b6ae282d745fd7950f3e92aacabc4d7e79ef6c..78fc516cef72c228ca4ca7fbd4d593ea1907a732 100644 (file)
@@ -79,7 +79,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
        default:
            arglist_free(prog, vec);
 
        default:
            arglist_free(prog, vec);
-           return (pidwait (pid, -1));
+           return pidwait(pid, -1);
        }
     }
 
        }
     }
 
index 426cddfc8442695d933cdbb4808f03a0ab9be990..2c8b1c7531ae9ea286de318e1bd52c88d119c894 100644 (file)
@@ -576,7 +576,7 @@ lockit (struct lockinfo *li)
     fd = link(tmpfile, curlock);
     (void) m_unlink(tmpfile);
 
     fd = link(tmpfile, curlock);
     (void) m_unlink(tmpfile);
 
-    return (fd == -1 ? -1 : 0);
+    return fd == -1 ? -1 : 0;
 }
 #endif /* HAVE_LIBLOCKFILE */
 
 }
 #endif /* HAVE_LIBLOCKFILE */
 
index c4e629cb7b6dd74cb6f4cb21ed4346c808afd63b..06e31afec898ef028dc114d455f4e75098f60cd3 100644 (file)
@@ -293,16 +293,16 @@ m_conv (struct msgs *mp, char *str, int call)
     delimp = cp;
 
     if (!strcmp (buf, "first"))
     delimp = cp;
 
     if (!strcmp (buf, "first"))
-       return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW)
-               ? mp->lowmsg : BADMSG);
+       return mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ?
+            mp->lowmsg : BADMSG;
 
     if (!strcmp (buf, "last")) {
        convdir = -1;
 
     if (!strcmp (buf, "last")) {
        convdir = -1;
-       return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ? mp->hghmsg : BADMSG);
+       return mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ? mp->hghmsg : BADMSG;
     }
 
     if (!strcmp (buf, "cur") || !strcmp (buf, "."))
     }
 
     if (!strcmp (buf, "cur") || !strcmp (buf, "."))
-       return (mp->curmsg > 0 ? mp->curmsg : BADMSG);
+       return mp->curmsg > 0 ? mp->curmsg : BADMSG;
 
     if (!strcmp (buf, "prev")) {
        convdir = -1;
 
     if (!strcmp (buf, "prev")) {
        convdir = -1;
index 2e56f0b0902f67b30c01660f5be6589ea03d2927..bd6602cb455a72e7f38626e6ca09cc19f2c42d03 100644 (file)
@@ -31,5 +31,5 @@ pidwait (pid_t id, int sigsok)
        SIGNAL (SIGQUIT, qstat);
     }
 
        SIGNAL (SIGQUIT, qstat);
     }
 
-    return (pid == -1 ? -1 : status);
+    return pid == -1 ? -1 : status;
 }
 }
index 2427f59caf18247c233afa60c96ae0bdd5d7a1c5..93484e4ecfbb04874b4820101d30cd2b740bf89d 100644 (file)
@@ -16,5 +16,5 @@ read_yes_or_no_if_tty (const char *prompt)
     if (interactive < 0)
         interactive = isatty (fileno (stdin));
 
     if (interactive < 0)
         interactive = isatty (fileno (stdin));
 
-    return (interactive ? read_switch (prompt, anoyes) : 1);
+    return interactive ? read_switch(prompt, anoyes) : 1;
 }
 }
index 4ba4908ad93acf61df0acf90b74eb9fe95009f0b..ade07f6e775415de3542aadf193a921538f71597 100644 (file)
@@ -47,6 +47,6 @@ refile (char **arg, char *file)
 
        default: 
            arglist_free(program, vec);
 
        default: 
            arglist_free(program, vec);
-           return (pidwait (pid, -1));
+           return pidwait(pid, -1);
     }
 }
     }
 }
index f3a2673855a3ecb1aa5ebf5338ca3545e720cd34..b7ed570794f1447d1ada46944535b9016e7eb6e8 100644 (file)
@@ -100,5 +100,5 @@ seq_list(struct msgs *mp, char *seqname)
            bp += strlen(bp);
        }
     }
            bp += strlen(bp);
        }
     }
-    return (bp > buffer? buffer : NULL);
+    return bp > buffer ? buffer : NULL;
 }
 }
index 480af1394362fdb12daf85cb7fafe9beddd66a0f..d3946bc6872944261d7ae59cac57f070a766315a 100644 (file)
@@ -28,7 +28,7 @@ vfgets (FILE *in, char **bp)
                *bp = pp;
                return 0;
            }
                *bp = pp;
                return 0;
            }
-           return (ferror (in) && !feof (in) ? -1 : 1);
+           return ferror(in) && !feof(in) ? -1 : 1;
        }
 
        if ((dp = cp + strlen (cp) - 2) < cp || *dp != QUOTE) {
        }
 
        if ((dp = cp + strlen (cp) - 2) < cp || *dp != QUOTE) {
index 40ec9b806451feb55949738fbb41eb98a38f0e5e..77322d4d60b251b513d6b83cf395dad7b784414a 100644 (file)
@@ -187,7 +187,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd,
            if (write (md, MMDF_DELIM, j) != j)
                return NOTOK;
 
            if (write (md, MMDF_DELIM, j) != j)
                return NOTOK;
 
-           return (i != NOTOK ? OK : NOTOK);
+           return i != NOTOK ? OK : NOTOK;
 
        case MBOX_FORMAT:
            if ((j = dup (fd)) == NOTOK)
 
        case MBOX_FORMAT:
            if ((j = dup (fd)) == NOTOK)
index 430a42e40738f5fb6c1993f0d9c615b8d81dd98f..90e87e1574dda76ade30e9fb2614530fcc66ba7c 100644 (file)
@@ -322,8 +322,8 @@ findlabel(struct format *addr)
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
-                       return(i);
-       return(-1);
+                       return i;
+       return -1;
 }
 
 static void
 }
 
 static void
@@ -435,7 +435,7 @@ f_typestr(int t)
        case FT_V_AMATCH: return "V_AMATCH";
        default:
                 snprintf(buf, sizeof buf, "/* ??? #%d */", t);
        case FT_V_AMATCH: return "V_AMATCH";
        default:
                 snprintf(buf, sizeof buf, "/* ??? #%d */", t);
-               return(buf);
+               return buf;
        }
 }
 
        }
 }
 
@@ -458,7 +458,7 @@ c_typestr(int t)
        FNORD(CT_ADDR, "ADDR");
        FNORD(CT_DATE, "DATE");
        strcat(buf, ">");
        FNORD(CT_ADDR, "ADDR");
        FNORD(CT_DATE, "DATE");
        strcat(buf, ">");
-       return(buf);
+       return buf;
 }
 
 static char *
 }
 
 static char *
@@ -477,7 +477,7 @@ c_flagsstr(int t)
        FNORD(CF_DATEFAB, "DATEFAB");
        FNORD(CF_TRIMMED, "TRIMMED");
        strcat(buf, ">");
        FNORD(CF_DATEFAB, "DATEFAB");
        FNORD(CF_TRIMMED, "TRIMMED");
        strcat(buf, ">");
-       return(buf);
+       return buf;
 }
 #undef FNORD
 
 }
 #undef FNORD
 
index 16d303f99061a30f9aa4e8df49b88113d03b0ace..6b49fc663150d027000d1fdea7f25ac7b381be42 100644 (file)
@@ -982,8 +982,8 @@ findlabel(struct format *addr)
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
-                       return(i);
-       return(-1);
+                       return i;
+       return -1;
 }
 
 static void
 }
 
 static void
@@ -1101,7 +1101,7 @@ f_typestr(int t)
        case FT_V_AMATCH: return "V_AMATCH";
        default:
                snprintf(buf, sizeof(buf), "/* ??? #%d */", t);
        case FT_V_AMATCH: return "V_AMATCH";
        default:
                snprintf(buf, sizeof(buf), "/* ??? #%d */", t);
-               return(buf);
+               return buf;
        }
 }
 
        }
 }
 
@@ -1111,7 +1111,7 @@ c_typestr(int t)
        static char buf[64];
 
        snprintb(buf, sizeof(buf), t, CT_BITS);
        static char buf[64];
 
        snprintb(buf, sizeof(buf), t, CT_BITS);
-       return(buf);
+       return buf;
 }
 
 static char *
 }
 
 static char *
@@ -1120,7 +1120,7 @@ c_flagsstr(int t)
        static char buf[64];
 
        snprintb(buf, sizeof(buf), t, CF_BITS);
        static char buf[64];
 
        snprintb(buf, sizeof(buf), t, CF_BITS);
-       return(buf);
+       return buf;
 }
 
 static void
 }
 
 static void
index fdf599294711b0ce1085ee1781469516b546ac6f..3ae8edcbb3de574b057d2c199695cd3d26917b22 100644 (file)
@@ -1620,7 +1620,7 @@ scan_content (CT ct, size_t maxunencoded)
         }
     }
 
         }
     }
 
-    return (boundaryclash ? NOTOK : OK);
+    return boundaryclash ? NOTOK : OK;
 }
 
 
 }
 
 
index ebb295b7c57a38a412e74c894b950271c86fe7b2..512ea2f956cb5caffbda0e1dbae1403abe868434 100644 (file)
@@ -499,7 +499,7 @@ show_content_aux2 (CT ct, int alternate, char *cracked, char *buffer,
             arglist_free(file, vec);
            if (fd != NOTOK)
                (*ct->c_ceclosefnx) (ct);
             arglist_free(file, vec);
            if (fd != NOTOK)
                (*ct->c_ceclosefnx) (ct);
-           return (alternate ? OK : status);
+           return alternate ? OK : status;
         }
     }
 }
         }
     }
 }
index 2a094f2b89a603765f60e6502ffa66bec80c99d3..09c5101595846a93832d3203c700ac5216f6975d 100644 (file)
@@ -782,7 +782,7 @@ losing:
 
        fclose (fp);
 
 
        fclose (fp);
 
-       return (cc != NOTOK ? OK : NOTOK);
+       return cc != NOTOK ? OK : NOTOK;
     }
 
     if (!ct->c_fp && (ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
     }
 
     if (!ct->c_fp && (ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
index a93190541f48e2c4a04e9649211c837e40fcaebd..356c341f6fec6f5d64aa609d0836d5c51655ccb1 100644 (file)
@@ -594,7 +594,7 @@ vcommand (const char *fmt, va_list ap)
        case OK: 
            if (poprint)
                fprintf (stderr, "<--- %s\n", response);
        case OK: 
            if (poprint)
                fprintf (stderr, "<--- %s\n", response);
-           return (*response == '+' ? OK : NOTOK);
+           return *response == '+' ? OK : NOTOK;
 
        case NOTOK: 
        case DONE: 
 
        case NOTOK: 
        case DONE: 
index 81197fc70fcb249139c97b0d37af9d6b7198df93..1a541e21ec43a2a19b37c54bd984d0fbdb0b5634 100644 (file)
@@ -1427,7 +1427,7 @@ annoaux (struct mailname *mp)
     snprintf (buffer, sizeof(buffer), "%s\n", adrformat (mp));
     i = strlen (buffer);
 
     snprintf (buffer, sizeof(buffer), "%s\n", adrformat (mp));
     i = strlen (buffer);
 
-    return (write (pfd, buffer, i) == i ? OK : NOTOK);
+    return write(pfd, buffer, i) == i ? OK : NOTOK;
 }
 
 
 }
 
 
index 224734e01237079d63491277e76f73fe11acdb6d..fc7b2c635885cd1d2d905fe3b516521adccc9ee6 100644 (file)
@@ -385,7 +385,7 @@ intrser (int i)
 static int
 chrcnv (char *cp)
 {
 static int
 chrcnv (char *cp)
 {
-    return (*cp != QUOTE ? *cp : m_atoi (++cp));
+    return *cp != QUOTE ? *cp : m_atoi(++cp);
 }
 
 
 }
 
 
index 457379cdc6c9dd0ae343c64af854fcd8599948ac..ea5cf266d25e194db1d0989cb1a176ceae5e7f9d 100644 (file)
@@ -348,7 +348,7 @@ finished:
     if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
        DIEWRERR();
 
     if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
        DIEWRERR();
 
-    return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG);
+    return state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG;
 }
 
 
 }
 
 
index fe027ee2f8b3f00c3a44e722a154a42222a0d3a0..6027eabd7792894b1aacdbea86c9a666b803bbd2 100644 (file)
@@ -636,7 +636,7 @@ usr_delivery (int fd, char *delivery, int su)
     }
 
     fclose (fp);
     }
 
     fclose (fp);
-    return (won ? 0 : -1);
+    return won ? 0 : -1;
 }
 
 
 }
 
 
@@ -1121,7 +1121,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress)
                     else
                         pidstatus (status, stdout, ", failed");
                }
                     else
                         pidstatus (status, stdout, ", failed");
                }
-               return (status == 0 ? 0 : -1);
+               return status == 0 ? 0 : -1;
            }
             /*
              * Ruthlessly kill the child and anything
            }
             /*
              * Ruthlessly kill the child and anything
index 3b5a4d8a65ae6efb50238d9f4903e545bf1956c6..9f95c6d26575903050f364899ee72d4a528b185e 100644 (file)
@@ -321,7 +321,7 @@ read_hdrs (struct msgs *mp, char *datesw)
        }
     }
     s->s_msg = 0;
        }
     }
     s->s_msg = 0;
-    return(s - smsgs);
+    return s - smsgs;
 }
 
 
 }
 
 
@@ -484,7 +484,7 @@ subsort (struct smsg **a, struct smsg **b)
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
        return i;
 
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
        return i;
 
-    return (dsort (a, b));
+    return dsort(a, b);
 }
 
 static int
 }
 
 static int