]> 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 80dabb7..f847842 100644 (file)
@@ -533,7 +533,7 @@ sm_wtxt (char *buffer, int 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;
     }
 
-    return (status ? RP_BHST : RP_OK);
+    return status ? RP_BHST : RP_OK;
 }
 
 
index f661ed1..b5039ed 100644 (file)
@@ -408,6 +408,6 @@ twsort (struct tws *tw1, struct tws *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 9053708..09a579f 100644 (file)
@@ -51,7 +51,7 @@
     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
index e5b6ae2..78fc516 100644 (file)
@@ -79,7 +79,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
        default:
            arglist_free(prog, vec);
-           return (pidwait (pid, -1));
+           return pidwait(pid, -1);
        }
     }
 
index 426cddf..2c8b1c7 100644 (file)
@@ -576,7 +576,7 @@ lockit (struct lockinfo *li)
     fd = link(tmpfile, curlock);
     (void) m_unlink(tmpfile);
 
-    return (fd == -1 ? -1 : 0);
+    return fd == -1 ? -1 : 0;
 }
 #endif /* HAVE_LIBLOCKFILE */
 
index c4e629c..06e31af 100644 (file)
@@ -293,16 +293,16 @@ m_conv (struct msgs *mp, char *str, int call)
     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;
-       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, "."))
-       return (mp->curmsg > 0 ? mp->curmsg : BADMSG);
+       return mp->curmsg > 0 ? mp->curmsg : BADMSG;
 
     if (!strcmp (buf, "prev")) {
        convdir = -1;
index 2e56f0b..bd6602c 100644 (file)
@@ -31,5 +31,5 @@ pidwait (pid_t id, int sigsok)
        SIGNAL (SIGQUIT, qstat);
     }
 
-    return (pid == -1 ? -1 : status);
+    return pid == -1 ? -1 : status;
 }
index 2427f59..93484e4 100644 (file)
@@ -16,5 +16,5 @@ read_yes_or_no_if_tty (const char *prompt)
     if (interactive < 0)
         interactive = isatty (fileno (stdin));
 
-    return (interactive ? read_switch (prompt, anoyes) : 1);
+    return interactive ? read_switch(prompt, anoyes) : 1;
 }
index 4ba4908..ade07f6 100644 (file)
@@ -47,6 +47,6 @@ refile (char **arg, char *file)
 
        default: 
            arglist_free(program, vec);
-           return (pidwait (pid, -1));
+           return pidwait(pid, -1);
     }
 }
index f3a2673..b7ed570 100644 (file)
@@ -100,5 +100,5 @@ seq_list(struct msgs *mp, char *seqname)
            bp += strlen(bp);
        }
     }
-    return (bp > buffer? buffer : NULL);
+    return bp > buffer ? buffer : NULL;
 }
index 480af13..d3946bc 100644 (file)
@@ -28,7 +28,7 @@ vfgets (FILE *in, char **bp)
                *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) {
index 40ec9b8..77322d4 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;
 
-           return (i != NOTOK ? OK : NOTOK);
+           return i != NOTOK ? OK : NOTOK;
 
        case MBOX_FORMAT:
            if ((j = dup (fd)) == NOTOK)
index 430a42e..90e87e1 100644 (file)
@@ -322,8 +322,8 @@ findlabel(struct format *addr)
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
-                       return(i);
-       return(-1);
+                       return i;
+       return -1;
 }
 
 static void
@@ -435,7 +435,7 @@ f_typestr(int 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, ">");
-       return(buf);
+       return buf;
 }
 
 static char *
@@ -477,7 +477,7 @@ c_flagsstr(int t)
        FNORD(CF_DATEFAB, "DATEFAB");
        FNORD(CF_TRIMMED, "TRIMMED");
        strcat(buf, ">");
-       return(buf);
+       return buf;
 }
 #undef FNORD
 
index 16d303f..6b49fc6 100644 (file)
@@ -982,8 +982,8 @@ findlabel(struct format *addr)
 
        for (i = 0; i < lused; ++i)
                if (addr == lvec[i])
-                       return(i);
-       return(-1);
+                       return i;
+       return -1;
 }
 
 static void
@@ -1101,7 +1101,7 @@ f_typestr(int 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);
-       return(buf);
+       return buf;
 }
 
 static char *
@@ -1120,7 +1120,7 @@ c_flagsstr(int t)
        static char buf[64];
 
        snprintb(buf, sizeof(buf), t, CF_BITS);
-       return(buf);
+       return buf;
 }
 
 static void
index fdf5992..3ae8edc 100644 (file)
@@ -1620,7 +1620,7 @@ scan_content (CT ct, size_t maxunencoded)
         }
     }
 
-    return (boundaryclash ? NOTOK : OK);
+    return boundaryclash ? NOTOK : OK;
 }
 
 
index ebb295b..512ea2f 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);
-           return (alternate ? OK : status);
+           return alternate ? OK : status;
         }
     }
 }
index 2a094f2..09c5101 100644 (file)
@@ -782,7 +782,7 @@ losing:
 
        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) {
index a931905..356c341 100644 (file)
@@ -594,7 +594,7 @@ vcommand (const char *fmt, va_list ap)
        case OK: 
            if (poprint)
                fprintf (stderr, "<--- %s\n", response);
-           return (*response == '+' ? OK : NOTOK);
+           return *response == '+' ? OK : NOTOK;
 
        case NOTOK: 
        case DONE: 
index 81197fc..1a541e2 100644 (file)
@@ -1427,7 +1427,7 @@ annoaux (struct mailname *mp)
     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 224734e..fc7b2c6 100644 (file)
@@ -385,7 +385,7 @@ intrser (int i)
 static int
 chrcnv (char *cp)
 {
-    return (*cp != QUOTE ? *cp : m_atoi (++cp));
+    return *cp != QUOTE ? *cp : m_atoi(++cp);
 }
 
 
index 457379c..ea5cf26 100644 (file)
@@ -348,7 +348,7 @@ finished:
     if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
        DIEWRERR();
 
-    return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG);
+    return state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG;
 }
 
 
index fe027ee..6027eab 100644 (file)
@@ -636,7 +636,7 @@ usr_delivery (int fd, char *delivery, int su)
     }
 
     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");
                }
-               return (status == 0 ? 0 : -1);
+               return status == 0 ? 0 : -1;
            }
             /*
              * Ruthlessly kill the child and anything
index 3b5a4d8..9f95c6d 100644 (file)
@@ -321,7 +321,7 @@ read_hdrs (struct msgs *mp, char *datesw)
        }
     }
     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;
 
-    return (dsort (a, b));
+    return dsort(a, b);
 }
 
 static int