Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): remove redundant parentheses around re...



details:   https://anonhg.NetBSD.org/src/rev/af8b39e5699d
branches:  trunk
changeset: 935452:af8b39e5699d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jul 03 08:02:55 2020 +0000

description:
make(1): remove redundant parentheses around return values

diffstat:

 usr.bin/make/arch.c        |  44 ++++++++++++++++++++++----------------------
 usr.bin/make/buf.c         |   8 ++++----
 usr.bin/make/compat.c      |  20 ++++++++++----------
 usr.bin/make/cond.c        |  28 ++++++++++++++--------------
 usr.bin/make/dir.c         |  30 +++++++++++++++---------------
 usr.bin/make/hash.c        |  14 +++++++-------
 usr.bin/make/job.c         |  22 +++++++++++-----------
 usr.bin/make/main.c        |  18 +++++++++---------
 usr.bin/make/make.c        |  30 +++++++++++++++---------------
 usr.bin/make/make_malloc.c |  10 +++++-----
 usr.bin/make/meta.c        |  10 +++++-----
 usr.bin/make/parse.c       |  26 +++++++++++++-------------
 usr.bin/make/suff.c        |  42 +++++++++++++++++++++---------------------
 usr.bin/make/targ.c        |  32 ++++++++++++++++----------------
 usr.bin/make/util.c        |  14 +++++++-------
 usr.bin/make/var.c         |   8 ++++----
 16 files changed, 178 insertions(+), 178 deletions(-)

diffs (truncated from 1547 to 300 lines):

diff -r d41e7872b2b2 -r af8b39e5699d usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Fri Jul 03 07:40:13 2020 +0000
+++ b/usr.bin/make/arch.c       Fri Jul 03 08:02:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.72 2020/07/02 15:47:38 rillig Exp $ */
+/*     $NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.72 2020/07/02 15:47:38 rillig Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.72 2020/07/02 15:47:38 rillig Exp $");
+__RCSID("$NetBSD: arch.c,v 1.73 2020/07/03 08:02:55 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -264,7 +264,7 @@
            free(freeIt);
 
            if (result == var_Error) {
-               return(FAILURE);
+               return FAILURE;
            } else {
                subLibName = TRUE;
            }
@@ -306,7 +306,7 @@
                free(freeIt);
 
                if (result == var_Error) {
-                   return(FAILURE);
+                   return FAILURE;
                } else {
                    doSubst = TRUE;
                }
@@ -324,7 +324,7 @@
         */
        if (*cp == '\0') {
            printf("No closing parenthesis in archive specification\n");
-           return (FAILURE);
+           return FAILURE;
        }
 
        /*
@@ -378,7 +378,7 @@
 
                if (gn == NULL) {
                    free(buf);
-                   return(FAILURE);
+                   return FAILURE;
                } else {
                    gn->type |= OP_ARCHV;
                    (void)Lst_AtEnd(nodeLst, gn);
@@ -389,7 +389,7 @@
                 * ourselves.
                 */
                free(buf);
-               return(FAILURE);
+               return FAILURE;
            }
            /*
             * Free buffer and continue with our work.
@@ -413,7 +413,7 @@
                gn = Targ_FindNode(nameBuf, TARG_CREATE);
                if (gn == NULL) {
                    free(nameBuf);
-                   return (FAILURE);
+                   return FAILURE;
                } else {
                    /*
                     * We've found the node, but have to make sure the rest of
@@ -435,7 +435,7 @@
            gn = Targ_FindNode(nameBuf, TARG_CREATE);
            free(nameBuf);
            if (gn == NULL) {
-               return (FAILURE);
+               return FAILURE;
            } else {
                /*
                 * We've found the node, but have to make sure the rest of the
@@ -472,7 +472,7 @@
     } while (*cp != '\0' && isspace ((unsigned char)*cp));
 
     *linePtr = cp;
-    return (SUCCESS);
+    return SUCCESS;
 }
 
 /*-
@@ -496,7 +496,7 @@
 static int
 ArchFindArchive(const void *ar, const void *archName)
 {
-    return (strcmp(archName, ((const Arch *)ar)->name));
+    return strcmp(archName, ((const Arch *)ar)->name);
 }
 
 /*-
@@ -555,7 +555,7 @@
        he = Hash_FindEntry(&ar->members, member);
 
        if (he != NULL) {
-           return ((struct ar_hdr *)Hash_GetValue(he));
+           return (struct ar_hdr *)Hash_GetValue(he);
        } else {
            /* Try truncated name */
            char copy[AR_MAX_NAME_LEN+1];
@@ -567,7 +567,7 @@
                copy[AR_MAX_NAME_LEN] = '\0';
            }
            if ((he = Hash_FindEntry(&ar->members, copy)) != NULL)
-               return ((struct ar_hdr *)Hash_GetValue(he));
+               return (struct ar_hdr *)Hash_GetValue(he);
            return NULL;
        }
     }
@@ -588,7 +588,7 @@
            return NULL;
        } else {
            fclose(arch);
-           return (&sarh);
+           return &sarh;
        }
     }
 
@@ -706,7 +706,7 @@
     he = Hash_FindEntry(&ar->members, member);
 
     if (he != NULL) {
-       return ((struct ar_hdr *)Hash_GetValue(he));
+       return (struct ar_hdr *)Hash_GetValue(he);
     } else {
        return NULL;
     }
@@ -915,7 +915,7 @@
                    fclose(arch);
                    return NULL;
                }
-               return (arch);
+               return arch;
            }
        } else
 #ifdef AR_EFMT1
@@ -949,7 +949,7 @@
                            fclose(arch);
                            return NULL;
                        }
-                       return (arch);
+                       return arch;
                }
                if (fseek(arch, -elen, SEEK_CUR) != 0) {
                    fclose(arch);
@@ -1105,7 +1105,7 @@
     }
 
     gn->mtime = modTime;
-    return (modTime);
+    return modTime;
 }
 
 /*-
@@ -1132,7 +1132,7 @@
 
     if (Lst_Open(gn->parents) != SUCCESS) {
        gn->mtime = 0;
-       return (0);
+       return 0;
     }
     while ((ln = Lst_Next(gn->parents)) != NULL) {
        pgn = (GNode *)Lst_Datum(ln);
@@ -1164,7 +1164,7 @@
 
     Lst_Close(gn->parents);
 
-    return (gn->mtime);
+    return gn->mtime;
 }
 
 /*-
@@ -1290,7 +1290,7 @@
        oodate = FALSE;
 #endif
     }
-    return (oodate);
+    return oodate;
 }
 
 /*-
diff -r d41e7872b2b2 -r af8b39e5699d usr.bin/make/buf.c
--- a/usr.bin/make/buf.c        Fri Jul 03 07:40:13 2020 +0000
+++ b/usr.bin/make/buf.c        Fri Jul 03 08:02:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $     */
+/*     $NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $";
+static char rcsid[] = "$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)buf.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: buf.c,v 1.25 2012/04/24 20:26:58 sjg Exp $");
+__RCSID("$NetBSD: buf.c,v 1.26 2020/07/03 08:02:55 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -160,7 +160,7 @@
     if (numBytesPtr != NULL)
        *numBytesPtr = bp->count;
 
-    return (bp->buffer);
+    return bp->buffer;
 }
 
 /*-
diff -r d41e7872b2b2 -r af8b39e5699d usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Fri Jul 03 07:40:13 2020 +0000
+++ b/usr.bin/make/compat.c     Fri Jul 03 08:02:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.111 2020/07/02 15:47:38 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.112 2020/07/03 08:02:55 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.111 2020/07/02 15:47:38 rillig Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.112 2020/07/03 08:02:55 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c   8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.111 2020/07/02 15:47:38 rillig Exp $");
+__RCSID("$NetBSD: compat.c,v 1.112 2020/07/03 08:02:55 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -246,18 +246,18 @@
 
     if (*cmdStart == '\0') {
        free(cmdStart);
-       return(0);
+       return 0;
     }
     cmd = cmdStart;
     Lst_Replace(cmdNode, cmdStart);
 
     if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) {
        (void)Lst_AtEnd(ENDNode->commands, cmdStart);
-       return(0);
+       return 0;
     }
     if (strcmp(cmdStart, "...") == 0) {
        gn->type |= OP_SAVE_CMDS;
-       return(0);
+       return 0;
     }
 
     while ((*cmd == '@') || (*cmd == '-') || (*cmd == '+')) {
@@ -284,7 +284,7 @@
      * If we did not end up with a command, just skip it.
      */
     if (!*cmd)
-       return (0);
+       return 0;
 
 #if !defined(MAKE_NATIVE)
     /*
@@ -322,7 +322,7 @@
      * we go...
      */
     if (!doIt && NoExecute(gn)) {
-       return (0);
+       return 0;
     }
     if (DEBUG(JOB))
        fprintf(debug_file, "Execute: '%s'\n", cmd);
@@ -497,7 +497,7 @@
        kill(myPid, compatSigno);



Home | Main Index | Thread Index | Old Index