]> diplodocus.org Git - nmh/commitdiff
Strip parenthesis from `return (state = OK);' and similar.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 18 Sep 2017 23:00:08 +0000 (00:00 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 18 Sep 2017 23:00:08 +0000 (00:00 +0100)
There are sufficient cases without the parenthesis that various
compilers must be happy without.

sbr/dtime.c
sbr/fmt_compile.c
sbr/geteditor.c
sbr/mf.c
uip/aliasbr.c
uip/mhlsbr.c
uip/slocal.c

index b5039ed..5e0fdc0 100644 (file)
@@ -355,7 +355,7 @@ dmktime (struct tws *tw)
     if (tw->tw_flags & TW_DST)
        result -= 60 * 60; /* One hour. */
 
-    return (tw->tw_clock = result);
+    return tw->tw_clock = result;
 }
 
 
index aeb770d..2ad46cf 100644 (file)
@@ -352,7 +352,7 @@ lookup(char *name)
 
     while ((nm = t->name)) {
        if (*nm == c && strcmp (nm, name) == 0)
-           return (ftbl = t);
+           return ftbl = t;
 
        t++;
     }
index 9889a5e..2fbe1f5 100644 (file)
@@ -23,5 +23,5 @@ get_default_editor(void)
        str = "vi";
     }
 
-    return (default_editor = str);
+    return default_editor = str;
 }
index 1ff8416..6c4afec 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -540,7 +540,7 @@ my_lex (char *buffer)
     bp = buffer;
     *bp = 0;
     if (!cp)
-       return (last_lex = LX_END);
+       return last_lex = LX_END;
 
     gotat = isat (cp);
     c = *cp++;
@@ -548,7 +548,7 @@ my_lex (char *buffer)
        c = *cp++;
     if (c == 0) {
        cp = NULL;
-       return (last_lex = LX_END);
+       return last_lex = LX_END;
     }
 
     if (c == '(') {
@@ -557,12 +557,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    ADDCHR(c);
                    continue;
@@ -589,12 +589,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    /* FALLTHRU */
                default: 
@@ -603,7 +603,7 @@ my_lex (char *buffer)
                case '"': 
                    ADDCHR(c);
                    *bp = 0;
-                   return (last_lex = LX_QSTR);
+                   return last_lex = LX_QSTR;
            }
     }
     
@@ -613,12 +613,12 @@ my_lex (char *buffer)
            switch (c = *cp++) {
                case 0: 
                    cp = NULL;
-                   return (last_lex = LX_ERR);
+                   return last_lex = LX_ERR;
                case '\\': 
                    ADDCHR(c);
                    if ((c = *cp++) == 0) {
                        cp = NULL;
-                       return (last_lex = LX_ERR);
+                       return last_lex = LX_ERR;
                    }
                    /* FALLTHRU */
                default: 
@@ -627,7 +627,7 @@ my_lex (char *buffer)
                case ']': 
                    ADDCHR(c);
                    *bp = 0;
-                   return (last_lex = LX_DLIT);
+                   return last_lex = LX_DLIT;
            }
     }
     
@@ -635,10 +635,10 @@ my_lex (char *buffer)
     *bp = 0;
     for (i = 0; special[i].lx_chr != 0; i++)
        if (c == special[i].lx_chr)
-           return (last_lex = special[i].lx_val);
+           return last_lex = special[i].lx_val;
 
     if (iscntrl ((unsigned char) c))
-       return (last_lex = LX_ERR);
+       return last_lex = LX_ERR;
 
     for (;;) {
        if ((c = *cp++) == 0)
@@ -663,7 +663,7 @@ got_atom: ;
  my_lex_buffull:
     /* Out of buffer space. *bp is the last byte in the buffer */
     *bp = 0;
-    return (last_lex = LX_ERR);
+    return last_lex = LX_ERR;
 }
 
 
index 7e8cf29..40687bb 100644 (file)
@@ -343,13 +343,13 @@ getalias (char *addrs)
     if (cp == NULL)
        cp = addrs;
     else if (*cp == 0)
-        return (cp = NULL);
+        return cp = NULL;
 
     /* Remove leading any space from the address. */
     for (pp = cp; isspace ((unsigned char) *pp); pp++)
        continue;
     if (*pp == 0)
-       return (cp = NULL);
+       return cp = NULL;
     /* Find the end of the address. */
     for (qp = pp; *qp != 0 && *qp != ','; qp++)
        continue;
index f51c562..bf3ed23 100644 (file)
@@ -748,7 +748,7 @@ evalvar (struct mcomp *c1)
     if (!strcasecmp (name, "length"))
        return ptoi (name, &c1->c_length);
     if (!strcasecmp (name, "nodashstuffing"))
-       return (dashstuff = -1);
+       return dashstuff = -1;
 
     for (ap = triples; ap->t_name; ap++)
        if (!strcasecmp (ap->t_name, name)) {
@@ -1409,7 +1409,7 @@ oneline (char *stuff, unsigned long flags)
     if (onelp == NULL)
        onelp = stuff;
     if (*onelp == 0)
-       return (onelp = NULL);
+       return onelp = NULL;
 
     ret = onelp;
     term = 0;
index 6866a0b..a4344fd 100644 (file)
@@ -931,13 +931,13 @@ logged_in (void)
             if (debug)
                 continue;
             endutxent();
-            return (utmped = DONE);
+            return utmped = DONE;
         }
     }
 
     endutxent();
 #endif /* HAVE_GETUTXENT */
-    return (utmped = NOTOK);
+    return utmped = NOTOK;
 }
 
 #define        check(t,a,b)            if (t < a || t > b) return -1