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): clean up coding style in compat, parse...



details:   https://anonhg.NetBSD.org/src/rev/38d33d538d1f
branches:  trunk
changeset: 946092:38d33d538d1f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 15 22:31:03 2020 +0000

description:
make(1): clean up coding style in compat, parse, suff

diffstat:

 usr.bin/make/compat.c |  7 +++----
 usr.bin/make/parse.c  |  8 ++++----
 usr.bin/make/suff.c   |  7 +++----
 3 files changed, 10 insertions(+), 12 deletions(-)

diffs (94 lines):

diff -r 701541d19ae9 -r 38d33d538d1f usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sun Nov 15 22:28:08 2020 +0000
+++ b/usr.bin/make/compat.c     Sun Nov 15 22:31:03 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.182 2020/11/14 14:16:01 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.183 2020/11/15 22:31:03 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.182 2020/11/14 14:16:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.183 2020/11/15 22:31:03 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -511,9 +511,8 @@
         * If the user is just seeing if something is out-of-date, exit now
         * to tell him/her "yes".
         */
-       if (opts.queryFlag) {
+       if (opts.queryFlag)
            exit(1);
-       }
 
        /*
         * We need to be re-made. We also have to make sure we've got a $?
diff -r 701541d19ae9 -r 38d33d538d1f usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Nov 15 22:28:08 2020 +0000
+++ b/usr.bin/make/parse.c      Sun Nov 15 22:31:03 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.441 2020/11/15 12:02:44 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.442 2020/11/15 22:31:03 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.441 2020/11/15 12:02:44 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.442 2020/11/15 22:31:03 rillig Exp $");
 
 /* types and constants */
 
@@ -865,7 +865,7 @@
     if (*src == '.' && ch_isupper(src[1])) {
        int keywd = ParseFindKeyword(src);
        if (keywd != -1) {
-           int op = parseKeywords[keywd].op;
+           GNodeType op = parseKeywords[keywd].op;
            if (op != 0) {
                ApplyDependencyOperator(op);
                return TRUE;
@@ -1673,7 +1673,7 @@
      * a .SILENT line creates silence when making all targets
      * a .PATH removes all directories from the search path(s).
      */
-    if (!*line) {
+    if (line[0] == '\0') {
        ParseDoDependencySourcesEmpty(specType, paths);
     } else if (specType == SP_MFLAGS) {
        /*
diff -r 701541d19ae9 -r 38d33d538d1f usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sun Nov 15 22:28:08 2020 +0000
+++ b/usr.bin/make/suff.c       Sun Nov 15 22:31:03 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.235 2020/11/08 19:53:11 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.236 2020/11/15 22:31:03 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.235 2020/11/08 19:53:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.236 2020/11/15 22:31:03 rillig Exp $");
 
 #define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
 #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -1793,9 +1793,8 @@
      * If the suffix indicates that the target is a library, mark that in
      * the node's type field.
      */
-    if (targ->suff->flags & SUFF_LIBRARY) {
+    if (targ->suff->flags & SUFF_LIBRARY)
        gn->type |= OP_LIB;
-    }
 
     /*
      * Check for overriding transformation rule implied by sources



Home | Main Index | Thread Index | Old Index