]> diplodocus.org Git - nmh/commitdiff
Replace `return (0)' and similar with `return 0'.
authorRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 14:34:31 +0000 (15:34 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Tue, 12 Sep 2017 14:34:31 +0000 (15:34 +0100)
Just outer parenthesis removed.

25 files changed:
config/config.c
sbr/context_find.c
sbr/dtime.c
sbr/ext_hook.c
sbr/fmt_addr.c
sbr/fmt_compile.c
sbr/fmt_rfc2047.c
sbr/fmt_scan.c
sbr/ruserpass.c
sbr/seq_list.c
sbr/signals.c
sbr/smatch.c
sbr/strindex.c
uip/aliasbr.c
uip/burst.c
uip/fmttest.c
uip/mhlsbr.c
uip/mhparam.c
uip/mhparse.c
uip/mhstoresbr.c
uip/picksbr.c
uip/post.c
uip/replsbr.c
uip/sortm.c
uip/whatnowsbr.c

index 5b08db28b7fb6f1934bb1193b98cc22dc03a7a6b..fa3df3bd8068d99ad46772bac8c1a76fb701ee72 100644 (file)
@@ -77,7 +77,7 @@ try_it:
 
     /* Check nmh `etc' directory */
     snprintf (epath, sizeof(epath), nmhetcdir(/%s), file);
 
     /* Check nmh `etc' directory */
     snprintf (epath, sizeof(epath), nmhetcdir(/%s), file);
-    return (access (epath, R_OK) != NOTOK ? epath : file);
+    return access(epath, R_OK) != NOTOK ? epath : file;
 }
 
 
 }
 
 
index c6ae2d8c8b14ae1f57faef9e1498049f61a315d0..f4fe7ed1303035120e68ff9b3d7d8032e2b81edf 100644 (file)
@@ -16,7 +16,7 @@ context_find (const char *str)
     str = FENDNULL(str);
     for (np = m_defs; np; np = np->n_next)
        if (!strcasecmp(FENDNULL(np->n_name), str))
     str = FENDNULL(str);
     for (np = m_defs; np; np = np->n_next)
        if (!strcasecmp(FENDNULL(np->n_name), str))
-           return (np->n_field);
+           return np->n_field;
 
     return NULL;
 }
 
     return NULL;
 }
index 56d874e0394079559e9b3449610363a3e5178896..dd6802b289b31f8a4f066c2b23165a7dc46d06b3 100644 (file)
@@ -118,7 +118,7 @@ dlocaltime (time_t *clock)
 
     tw.tw_clock = *clock;
 
 
     tw.tw_clock = *clock;
 
-    return (&tw);
+    return &tw;
 }
 
 
 }
 
 
@@ -165,7 +165,7 @@ dgmtime (time_t *clock)
 
     tw.tw_clock = *clock;
 
 
     tw.tw_clock = *clock;
 
-    return (&tw);
+    return &tw;
 }
 
 
 }
 
 
index befbd94b48c2dbd2ba30ef631a70322f8893a7b3..3cde1fd960bd6222ee739a410bf10c63e465b6ba 100644 (file)
@@ -23,7 +23,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
     static  int        did_message = 0;        /* set if we've already output a message */
 
     if ((hook = context_find(hook_name)) == NULL)
     static  int        did_message = 0;        /* set if we've already output a message */
 
     if ((hook = context_find(hook_name)) == NULL)
-       return (OK);
+       return OK;
 
     switch (pid = fork()) {
     case -1:
 
     switch (pid = fork()) {
     case -1:
@@ -59,7 +59,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
            did_message = 1;
        }
 
            did_message = 1;
        }
 
-       return (NOTOK);
+       return NOTOK;
     } else
     } else
-       return (OK);
+       return OK;
 }
 }
index 8e2e5456f1713c0f98b6b0c1ff5e632e6fec9747..2c7b58e423579c442e4a5ef9058adf54b6254aa3 100644 (file)
@@ -108,7 +108,7 @@ formataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 char *concataddr (char *orig, char *str)
 }
 
 char *concataddr (char *orig, char *str)
index aa555c623fd050dce66ed0ed07861bafca77b5e0..d25c3bbb35fcb1301f649586f678eb9b10393fe2 100644 (file)
@@ -419,7 +419,7 @@ fmt_compile(char *fstring, struct format **fmt, int reset_comptable)
     *fmt = formatvec;
 
     free(format_string);
     *fmt = formatvec;
 
     free(format_string);
-    return (ncomp);
+    return ncomp;
 }
 
 static char *
 }
 
 static char *
@@ -444,7 +444,7 @@ compile (char *sp)
            break;
        }
        if (c == 0)
            break;
        }
        if (c == 0)
-           return (cp);
+           return cp;
 
        switch (c = *++cp) {
        case '%':
 
        switch (c = *++cp) {
        case '%':
@@ -456,7 +456,7 @@ compile (char *sp)
        case '>':
        case '?':
        case ']':
        case '>':
        case '?':
        case ']':
-           return (cp);
+           return cp;
 
        case '<':
            cp = do_if(++cp);
 
        case '<':
            cp = do_if(++cp);
@@ -531,7 +531,7 @@ do_spec(char *sp)
     fp->f_width = wid;
     fp->f_fill = fill;
 
     fp->f_width = wid;
     fp->f_fill = fill;
 
-    return (cp);
+    return cp;
 }
 
 /*
 }
 
 /*
@@ -595,7 +595,7 @@ do_name(char *sp, int preprocess)
        cm->c_type |= CT_ADDR;
        break;
     }
        cm->c_type |= CT_ADDR;
        break;
     }
-    return (cp);
+    return cp;
 }
 
 /*
 }
 
 /*
@@ -759,7 +759,7 @@ do_func(char *sp)
        CERROR("')' expected");
     }
     --infunction;
        CERROR("')' expected");
     }
     --infunction;
-    return (cp);
+    return cp;
 }
 
 /*
 }
 
 /*
@@ -778,13 +778,13 @@ do_expr (char *sp, int preprocess)
     } else if (c == '(') {
        cp = do_func (cp);
     } else if (c == ')') {
     } else if (c == '(') {
        cp = do_func (cp);
     } else if (c == ')') {
-       return (--cp);
+       return --cp;
     } else if (c == '%' && *cp == '<') {
        cp = do_if (cp+1);
     } else {
        CERROR ("'(', '{', '%<' or ')' expected");
     }
     } else if (c == '%' && *cp == '<') {
        cp = do_if (cp+1);
     } else {
        CERROR ("'(', '{', '%<' or ')' expected");
     }
-    return (cp);
+    return cp;
 }
 
 /*
 }
 
 /*
@@ -921,7 +921,7 @@ do_if(char *sp)
     if (fexpr)                         /* IF ... [ELSIF ...] ENDIF */
        fexpr->f_skip = next_fp - fexpr;
 
     if (fexpr)                         /* IF ... [ELSIF ...] ENDIF */
        fexpr->f_skip = next_fp - fexpr;
 
-    return (cp);
+    return cp;
 }
 
 /*
 }
 
 /*
index a43b5dc12eb5f5ba68070e51641038a92fee62b4..db8bf7859c306fee73ee4b8b66aeb47608120489 100644 (file)
@@ -52,7 +52,7 @@ decode_qp (unsigned char byte1, unsigned char byte2)
 {
     if (hexindex[byte1] == -1 || hexindex[byte2] == -1)
        return -1;
 {
     if (hexindex[byte1] == -1 || hexindex[byte2] == -1)
        return -1;
-    return (hexindex[byte1] << 4 | hexindex[byte2]);
+    return hexindex[byte1] << 4 | hexindex[byte2];
 }
 
 /* Check if character is linear whitespace */
 }
 
 /* Check if character is linear whitespace */
index e80edc19117ccc5fa2cb95128c96ad09da5c9b9e..791146a21a83203925743d1791b40bc247dafe52 100644 (file)
@@ -1206,5 +1206,5 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat,
        }
     }
 
        }
     }
 
-    return (NULL);
+    return NULL;
 }
 }
index 1e43571e40663a784aac3b62db1b46b722e1ca75..5c47aa114a733872bf013af3b38d9b5087918db9 100644 (file)
@@ -218,7 +218,7 @@ token(char *tokval)
 
     for (t = toktabs; t->tokstr; t++)
        if (!strcmp(t->tokstr, tokval))
 
     for (t = toktabs; t->tokstr; t++)
        if (!strcmp(t->tokstr, tokval))
-           return (t->tval);
+           return t->tval;
 
 
-    return (ID);
+    return ID;
 }
 }
index c456428108faa6aa338200a9ac3d40aa67cb20b7..f3a2673855a3ecb1aa5ebf5338ca3545e720cd34 100644 (file)
@@ -38,9 +38,9 @@ seq_list(struct msgs *mp, char *seqname)
     if (!strcmp (current, seqname)) {
        if (mp->curmsg) {       
            snprintf(buffer, len, "%s", m_name(mp->curmsg));
     if (!strcmp (current, seqname)) {
        if (mp->curmsg) {       
            snprintf(buffer, len, "%s", m_name(mp->curmsg));
-           return (buffer);
+           return buffer;
        }
        }
-        return (NULL);
+        return NULL;
     }
 
     /* If the folder is empty, just return NULL */
     }
 
     /* If the folder is empty, just return NULL */
index accb69504784306ef83cae54f23119dd49349b71..ad18261bb734d64e5badd07f5876a9edb260d9a5 100644 (file)
@@ -39,8 +39,8 @@ SIGNAL (int sig, SIGNAL_HANDLER func)
 # endif
     }
     if (sigaction(sig, &act, &oact) < 0)
 # endif
     }
     if (sigaction(sig, &act, &oact) < 0)
-       return (SIG_ERR);
-    return (oact.sa_handler);
+       return SIG_ERR;
+    return oact.sa_handler;
 }
 
 
 }
 
 
@@ -56,7 +56,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
     struct sigaction act, oact;
 
     if (sigaction(sig, NULL, &oact) < 0)
     struct sigaction act, oact;
 
     if (sigaction(sig, NULL, &oact) < 0)
-       return (SIG_ERR);
+       return SIG_ERR;
     if (oact.sa_handler != SIG_IGN) {
        act.sa_handler = func;
        sigemptyset(&act.sa_mask);
     if (oact.sa_handler != SIG_IGN) {
        act.sa_handler = func;
        sigemptyset(&act.sa_mask);
@@ -72,9 +72,9 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
 # endif
        }
        if (sigaction(sig, &act, &oact) < 0)
 # endif
        }
        if (sigaction(sig, &act, &oact) < 0)
-           return (SIG_ERR);
+           return SIG_ERR;
     }
     }
-    return (oact.sa_handler);
+    return oact.sa_handler;
 }
 
 
 }
 
 
index f30e589905ee4c772dfb4bcf68d12ff1c713c058..802e4da06a541f8b9db37f7c35b02f79bfc7af6e 100644 (file)
@@ -41,5 +41,5 @@ smatch(const char *string, const struct swit *swp)
            firstone = AMBIGSW;
     }
 
            firstone = AMBIGSW;
     }
 
-    return (firstone);
+    return firstone;
 }
 }
index ad1d18feb70c4c0ce0fe5b46ca0d19b25992ba1f..b2bc9ff9f83ff1f0a9cc923754a454adeda2412f 100644 (file)
@@ -17,7 +17,7 @@ stringdex (char *p1, char *p2)
 
     for (p = p2; *p; p++)
        if (uprf (p, p1))
 
     for (p = p2; *p; p++)
        if (uprf (p, p1))
-           return (p - p2);
+           return p - p2;
 
     return -1;
 }
 
     return -1;
 }
index e5163a016a1ba95811e2dc249a685062e585422e..7e8cf29a0528cadcfdb453b5b5d2f4b26689d1f9 100644 (file)
@@ -154,7 +154,7 @@ aleq (char *string, char *aliasent)
         aliasent++;
     }
 
         aliasent++;
     }
 
-    return (*aliasent == 0 || *aliasent == '*');
+    return *aliasent == 0 || *aliasent == '*';
 }
 
 
 }
 
 
index 87538ae709aee7c9f6c90583396a65e4132903d7..5623e2c19060f3a46e25369f5c6044d009401d5a 100644 (file)
@@ -252,7 +252,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw)
                adios (msgnam, "does not have any message/rfc822 parts");
            if (msgp > 1) {
                *mimesw = 1;
                adios (msgnam, "does not have any message/rfc822 parts");
            if (msgp > 1) {
                *mimesw = 1;
-               return (msgp - 1);
+               return msgp - 1;
            }
        }
     }
            }
        }
     }
@@ -315,7 +315,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw)
     }
 
     fclose (in);
     }
 
     fclose (in);
-    return (msgp - 1);         /* return the number of messages burst */
+    return msgp - 1;           /* return the number of messages burst */
 }
 
 
 }
 
 
index 78f08561fcd56ecdbe85ff8771b09b83268d43a0..16d303f99061a30f9aa4e8df49b88113d03b0ace 100644 (file)
@@ -1269,7 +1269,7 @@ test_formataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 
 }
 
 
index df0e24bf101ebf63a44cd49767acebf3a2e55135..9b7cdd4925d8cfdbbc1175031ce7c9a0fc5d30db 100644 (file)
@@ -1111,7 +1111,7 @@ mcomp_flags (char *name)
 
     for (ap = pairs; ap->p_name; ap++)
        if (!strcasecmp (ap->p_name, name))
 
     for (ap = pairs; ap->p_name; ap++)
        if (!strcasecmp (ap->p_name, name))
-           return (ap->p_flags);
+           return ap->p_flags;
 
     return 0;
 }
 
     return 0;
 }
index 3fc381b8ddc5e294217a06d5ff6b255c2bb8e9c1..bfecb9fb6ad071c1d09bbe58b3f1fe88c7c418a2 100644 (file)
@@ -270,7 +270,7 @@ p_find(char *str)
 
     for (ps = procs; ps->p_name; ps++)
        if (!strcasecmp (ps->p_name, str))
 
     for (ps = procs; ps->p_name; ps++)
        if (!strcasecmp (ps->p_name, str))
-           return (*ps->p_field);
+           return *ps->p_field;
 
     return NULL;
 }
 
     return NULL;
 }
index 1dc44e7a6cb42e5d874de805d79db3db8a7b7837..1b2d23f759e891895f605a2066403878e64f080c 100644 (file)
@@ -1714,11 +1714,11 @@ size_encoding (CT ct)
     }
 
     if (ct->c_encoding == CE_EXTERNAL)
     }
 
     if (ct->c_encoding == CE_EXTERNAL)
-       return (ct->c_end - ct->c_begin);       
+       return ct->c_end - ct->c_begin; 
 
     file = NULL;
     if ((fd = (*ct->c_ceopenfnx) (ct, &file)) == NOTOK)
 
     file = NULL;
     if ((fd = (*ct->c_ceopenfnx) (ct, &file)) == NOTOK)
-       return (ct->c_end - ct->c_begin);
+       return ct->c_end - ct->c_begin;
 
     if (fstat (fd, &st) != NOTOK)
        size = (long) st.st_size;
 
     if (fstat (fd, &st) != NOTOK)
        size = (long) st.st_size;
index 0e9b94cd112d0e68f9eb25bf481d46a874889443..2a094f2b89a603765f60e6502ffa66bec80c99d3 100644 (file)
@@ -470,7 +470,7 @@ ct_compar (CT *a, CT *b)
     struct partial *am = (struct partial *) ((*a)->c_ctparams);
     struct partial *bm = (struct partial *) ((*b)->c_ctparams);
 
     struct partial *am = (struct partial *) ((*a)->c_ctparams);
     struct partial *bm = (struct partial *) ((*b)->c_ctparams);
 
-    return (am->pm_marked - bm->pm_marked);
+    return am->pm_marked - bm->pm_marked;
 }
 
 
 }
 
 
index 54b50e70cafaadad2ff4e263f2a73210d92aed4f..432bcf10d137b4e31a40bcec988c0712ed12c24f 100644 (file)
@@ -793,7 +793,7 @@ advance (char *alp, char *aep)
                do {
                    lp--;
                    if (advance ((char *) lp, (char *) ep))
                do {
                    lp--;
                    if (advance ((char *) lp, (char *) ep))
-                       return (1);
+                       return 1;
                } while (lp > curlp);
                return 0;
 
                } while (lp > curlp);
                return 0;
 
@@ -812,14 +812,14 @@ cclass (unsigned char *aset, int ac, int af)
 
     set = aset;
     if ((c = ac) == 0)
 
     set = aset;
     if ((c = ac) == 0)
-       return (0);
+       return 0;
 
     n = *set++;
     while (n--)
        if (*set++ == c || set[-1] == cc[c])
 
     n = *set++;
     while (n--)
        if (*set++ == c || set[-1] == cc[c])
-           return (af);
+           return af;
 
 
-    return (!af);
+    return !af;
 }
 
 
 }
 
 
index 7cbf9dc96c6e7440a659ac915ff1cdbd0ae88e19..81197fc70fcb249139c97b0d37af9d6b7198df93 100644 (file)
@@ -1224,7 +1224,7 @@ get_header (char *header, struct headers *table)
     header = FENDNULL(header);
     for (h = table; h->value; h++)
        if (!strcasecmp(FENDNULL(h->value), header))
     header = FENDNULL(header);
     for (h = table; h->value; h++)
        if (!strcasecmp(FENDNULL(h->value), header))
-           return (h - table);
+           return h - table;
 
     return NOTOK;
 }
 
     return NOTOK;
 }
@@ -1300,7 +1300,7 @@ putadr (char *name, char *aka, struct mailname *mp, FILE *out,
 
     linepos += len;
 
 
     linepos += len;
 
-    return (flags & HTRY);
+    return flags & HTRY;
 }
 
 
 }
 
 
index b5e10827d3e2f2b7affe6b4a3b8688e57c0657b6..afcf2ffc46daa748070e1fb090665ba83db5b525 100644 (file)
@@ -345,7 +345,7 @@ replformataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 
 }
 
 
index 2e2809a2b28547b7598bad7a6fea16fd14d9cbe3..3b5a4d8a65ae6efb50238d9f4903e545bf1956c6 100644 (file)
@@ -343,7 +343,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
 
     if ((in = fopen (msgnam = m_name (msg), "r")) == NULL) {
        admonish (msgnam, "unable to read message");
 
     if ((in = fopen (msgnam = m_name (msg), "r")) == NULL) {
        admonish (msgnam, "unable to read message");
-       return (0);
+       return 0;
     }
     gstate = m_getfld_state_init(in);
     for (compnum = 1;;) {
     }
     gstate = m_getfld_state_init(in);
     for (compnum = 1;;) {
@@ -393,7 +393,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
             free(datecomp);
             free(subjcomp);
            fclose (in);
             free(datecomp);
             free(subjcomp);
            fclose (in);
-           return (0);
+           return 0;
 
        default:
            adios (NULL, "internal error -- you lose");
 
        default:
            adios (NULL, "internal error -- you lose");
@@ -455,7 +455,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
     fclose (in);
     free(datecomp);
 
     fclose (in);
     free(datecomp);
 
-    return (1);
+    return 1;
 }
 
 /*
 }
 
 /*
@@ -465,12 +465,12 @@ static int
 dsort (struct smsg **a, struct smsg **b)
 {
     if ((*a)->s_clock < (*b)->s_clock)
 dsort (struct smsg **a, struct smsg **b)
 {
     if ((*a)->s_clock < (*b)->s_clock)
-       return (-1);
+       return -1;
     if ((*a)->s_clock > (*b)->s_clock)
     if ((*a)->s_clock > (*b)->s_clock)
-       return (1);
+       return 1;
     if ((*a)->s_msg < (*b)->s_msg)
     if ((*a)->s_msg < (*b)->s_msg)
-       return (-1);
-    return (1);
+       return -1;
+    return 1;
 }
 
 /*
 }
 
 /*
@@ -482,7 +482,7 @@ subsort (struct smsg **a, struct smsg **b)
     int i;
 
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
     int i;
 
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
-       return (i);
+       return i;
 
     return (dsort (a, b));
 }
 
     return (dsort (a, b));
 }
@@ -493,10 +493,10 @@ txtsort (struct smsg **a, struct smsg **b)
     int i;
 
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
     int i;
 
     if ((i = strcmp ((*a)->s_subj, (*b)->s_subj)))
-       return (i);
+       return i;
     if ((*a)->s_msg < (*b)->s_msg)
     if ((*a)->s_msg < (*b)->s_msg)
-       return (-1);
-    return (1);
+       return -1;
+    return 1;
 }
 
 static void
 }
 
 static void
index 72b315f41be2b7c24b724a112e4c263fa46ea0bc..b02b5e22cf7ac6ee91fc09917872281369b2c33c 100644 (file)
@@ -882,7 +882,7 @@ buildfile (char **argp, char *file)
     i = editfile (&ed, args, file, NOUSE, NULL, NULL, NULL, 0, 0);
     free (args);
 
     i = editfile (&ed, args, file, NOUSE, NULL, NULL, NULL, 0, 0);
     free (args);
 
-    return (i ? NOTOK : OK);
+    return i ? NOTOK : OK;
 }
 
 
 }
 
 
@@ -1283,7 +1283,7 @@ whomfile (char **arg, char *file)
            _exit (-1);         /* NOTREACHED */
 
        default:
            _exit (-1);         /* NOTREACHED */
 
        default:
-           return (pidwait (pid, NOTOK) & 0377 ? 1 : 0);
+           return pidwait(pid, NOTOK) & 0377 ? 1 : 0;
     }
 }
 
     }
 }
 
@@ -1316,7 +1316,7 @@ checkmimeheader (char *drft)
 
     if ((f = fopen(drft, "r")) == NULL) {
        admonish(drft, "unable to read draft");
 
     if ((f = fopen(drft, "r")) == NULL) {
        admonish(drft, "unable to read draft");
-       return (0);
+       return 0;
     }
 
     gstate = m_getfld_state_init(f);
     }
 
     gstate = m_getfld_state_init(f);