]> 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 5b08db2..fa3df3b 100644 (file)
@@ -77,7 +77,7 @@ try_it:
 
     /* 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 c6ae2d8..f4fe7ed 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))
-           return (np->n_field);
+           return np->n_field;
 
     return NULL;
 }
index 56d874e..dd6802b 100644 (file)
@@ -118,7 +118,7 @@ dlocaltime (time_t *clock)
 
     tw.tw_clock = *clock;
 
-    return (&tw);
+    return &tw;
 }
 
 
@@ -165,7 +165,7 @@ dgmtime (time_t *clock)
 
     tw.tw_clock = *clock;
 
-    return (&tw);
+    return &tw;
 }
 
 
index befbd94..3cde1fd 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)
-       return (OK);
+       return OK;
 
     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;
        }
 
-       return (NOTOK);
+       return NOTOK;
     } else
-       return (OK);
+       return OK;
 }
index 8e2e545..2c7b58e 100644 (file)
@@ -108,7 +108,7 @@ formataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 char *concataddr (char *orig, char *str)
index aa555c6..d25c3bb 100644 (file)
@@ -419,7 +419,7 @@ fmt_compile(char *fstring, struct format **fmt, int reset_comptable)
     *fmt = formatvec;
 
     free(format_string);
-    return (ncomp);
+    return ncomp;
 }
 
 static char *
@@ -444,7 +444,7 @@ compile (char *sp)
            break;
        }
        if (c == 0)
-           return (cp);
+           return cp;
 
        switch (c = *++cp) {
        case '%':
@@ -456,7 +456,7 @@ compile (char *sp)
        case '>':
        case '?':
        case ']':
-           return (cp);
+           return cp;
 
        case '<':
            cp = do_if(++cp);
@@ -531,7 +531,7 @@ do_spec(char *sp)
     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;
     }
-    return (cp);
+    return cp;
 }
 
 /*
@@ -759,7 +759,7 @@ do_func(char *sp)
        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 == ')') {
-       return (--cp);
+       return --cp;
     } 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;
 
-    return (cp);
+    return cp;
 }
 
 /*
index a43b5dc..db8bf78 100644 (file)
@@ -52,7 +52,7 @@ decode_qp (unsigned char byte1, unsigned char byte2)
 {
     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 */
index e80edc1..791146a 100644 (file)
@@ -1206,5 +1206,5 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat,
        }
     }
 
-    return (NULL);
+    return NULL;
 }
index 1e43571..5c47aa1 100644 (file)
@@ -218,7 +218,7 @@ token(char *tokval)
 
     for (t = toktabs; t->tokstr; t++)
        if (!strcmp(t->tokstr, tokval))
-           return (t->tval);
+           return t->tval;
 
-    return (ID);
+    return ID;
 }
index c456428..f3a2673 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));
-           return (buffer);
+           return buffer;
        }
-        return (NULL);
+        return NULL;
     }
 
     /* If the folder is empty, just return NULL */
index accb695..ad18261 100644 (file)
@@ -39,8 +39,8 @@ SIGNAL (int sig, SIGNAL_HANDLER func)
 # 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)
-       return (SIG_ERR);
+       return SIG_ERR;
     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)
-           return (SIG_ERR);
+           return SIG_ERR;
     }
-    return (oact.sa_handler);
+    return oact.sa_handler;
 }
 
 
index f30e589..802e4da 100644 (file)
@@ -41,5 +41,5 @@ smatch(const char *string, const struct swit *swp)
            firstone = AMBIGSW;
     }
 
-    return (firstone);
+    return firstone;
 }
index ad1d18f..b2bc9ff 100644 (file)
@@ -17,7 +17,7 @@ stringdex (char *p1, char *p2)
 
     for (p = p2; *p; p++)
        if (uprf (p, p1))
-           return (p - p2);
+           return p - p2;
 
     return -1;
 }
index e5163a0..7e8cf29 100644 (file)
@@ -154,7 +154,7 @@ aleq (char *string, char *aliasent)
         aliasent++;
     }
 
-    return (*aliasent == 0 || *aliasent == '*');
+    return *aliasent == 0 || *aliasent == '*';
 }
 
 
index 87538ae..5623e2c 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;
-               return (msgp - 1);
+               return msgp - 1;
            }
        }
     }
@@ -315,7 +315,7 @@ find_delim (int msgnum, struct smsg *smsgs, int *mimesw)
     }
 
     fclose (in);
-    return (msgp - 1);         /* return the number of messages burst */
+    return msgp - 1;           /* return the number of messages burst */
 }
 
 
index 78f0856..16d303f 100644 (file)
@@ -1269,7 +1269,7 @@ test_formataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 
index df0e24b..9b7cdd4 100644 (file)
@@ -1111,7 +1111,7 @@ mcomp_flags (char *name)
 
     for (ap = pairs; ap->p_name; ap++)
        if (!strcasecmp (ap->p_name, name))
-           return (ap->p_flags);
+           return ap->p_flags;
 
     return 0;
 }
index 3fc381b..bfecb9f 100644 (file)
@@ -270,7 +270,7 @@ p_find(char *str)
 
     for (ps = procs; ps->p_name; ps++)
        if (!strcasecmp (ps->p_name, str))
-           return (*ps->p_field);
+           return *ps->p_field;
 
     return NULL;
 }
index 1dc44e7..1b2d23f 100644 (file)
@@ -1714,11 +1714,11 @@ size_encoding (CT ct)
     }
 
     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)
-       return (ct->c_end - ct->c_begin);
+       return ct->c_end - ct->c_begin;
 
     if (fstat (fd, &st) != NOTOK)
        size = (long) st.st_size;
index 0e9b94c..2a094f2 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);
 
-    return (am->pm_marked - bm->pm_marked);
+    return am->pm_marked - bm->pm_marked;
 }
 
 
index 54b50e7..432bcf1 100644 (file)
@@ -793,7 +793,7 @@ advance (char *alp, char *aep)
                do {
                    lp--;
                    if (advance ((char *) lp, (char *) ep))
-                       return (1);
+                       return 1;
                } while (lp > curlp);
                return 0;
 
@@ -812,14 +812,14 @@ cclass (unsigned char *aset, int ac, int af)
 
     set = aset;
     if ((c = ac) == 0)
-       return (0);
+       return 0;
 
     n = *set++;
     while (n--)
        if (*set++ == c || set[-1] == cc[c])
-           return (af);
+           return af;
 
-    return (!af);
+    return !af;
 }
 
 
index 7cbf9dc..81197fc 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))
-           return (h - table);
+           return h - table;
 
     return NOTOK;
 }
@@ -1300,7 +1300,7 @@ putadr (char *name, char *aka, struct mailname *mp, FILE *out,
 
     linepos += len;
 
-    return (flags & HTRY);
+    return flags & HTRY;
 }
 
 
index b5e1082..afcf2ff 100644 (file)
@@ -345,7 +345,7 @@ replformataddr (char *orig, char *str)
 
     *dst = '\0';
     last_dst = dst;
-    return (buf);
+    return buf;
 }
 
 
index 2e2809a..3b5a4d8 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");
-       return (0);
+       return 0;
     }
     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);
-           return (0);
+           return 0;
 
        default:
            adios (NULL, "internal error -- you lose");
@@ -455,7 +455,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
     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)
-       return (-1);
+       return -1;
     if ((*a)->s_clock > (*b)->s_clock)
-       return (1);
+       return 1;
     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)))
-       return (i);
+       return i;
 
     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)))
-       return (i);
+       return i;
     if ((*a)->s_msg < (*b)->s_msg)
-       return (-1);
-    return (1);
+       return -1;
+    return 1;
 }
 
 static void
index 72b315f..b02b5e2 100644 (file)
@@ -882,7 +882,7 @@ buildfile (char **argp, char *file)
     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:
-           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");
-       return (0);
+       return 0;
     }
 
     gstate = m_getfld_state_init(f);