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: remove redundant braces



details:   https://anonhg.NetBSD.org/src/rev/3b72590b8820
branches:  trunk
changeset: 359513:3b72590b8820
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 08 09:53:44 2022 +0000

description:
make: remove redundant braces

No binary change, except for assertion line numbers.

diffstat:

 usr.bin/make/compat.c |  29 ++++++++++-------------------
 usr.bin/make/job.c    |  13 +++++--------
 usr.bin/make/make.c   |   7 +++----
 3 files changed, 18 insertions(+), 31 deletions(-)

diffs (172 lines):

diff -r ab7d204cb449 -r 3b72590b8820 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sat Jan 08 09:02:47 2022 +0000
+++ b/usr.bin/make/compat.c     Sat Jan 08 09:53:44 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.236 2022/01/07 19:24:27 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.237 2022/01/08 09:53:44 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.236 2022/01/07 19:24:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.237 2022/01/08 09:53:44 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -349,25 +349,20 @@
        }
 
 #ifdef USE_META
-       if (useMeta) {
+       if (useMeta)
                meta_compat_start();
-       }
 #endif
 
        Var_ReexportVars();
 
-       /*
-        * Fork and execute the single command. If the fork fails, we abort.
-        */
        compatChild = cpid = vfork();
-       if (cpid < 0) {
+       if (cpid < 0)
                Fatal("Could not fork");
-       }
+
        if (cpid == 0) {
 #ifdef USE_META
-               if (useMeta) {
+               if (useMeta)
                        meta_compat_child();
-               }
 #endif
                (void)execvp(av[0], (char *const *)UNCONST(av));
                execDie("exec", av[0]);
@@ -381,9 +376,8 @@
        LstNode_SetNull(ln);
 
 #ifdef USE_META
-       if (useMeta) {
+       if (useMeta)
                meta_compat_parent(cpid);
-       }
 #endif
 
        /*
@@ -405,9 +399,8 @@
        } else if (WIFEXITED(reason)) {
                status = WEXITSTATUS(reason);   /* exited */
 #if defined(USE_META) && defined(USE_FILEMON_ONCE)
-               if (useMeta) {
+               if (useMeta)
                        meta_cmd_finish(NULL);
-               }
 #endif
                if (status != 0) {
                        if (DEBUG(ERROR))
@@ -423,9 +416,8 @@
        if (!WIFEXITED(reason) || status != 0) {
                if (errCheck) {
 #ifdef USE_META
-                       if (useMeta) {
+                       if (useMeta)
                                meta_job_error(NULL, gn, false, status);
-                       }
 #endif
                        gn->made = ERROR;
                        if (opts.keepgoing) {
@@ -557,9 +549,8 @@
                if (!opts.touch || (gn->type & OP_MAKE)) {
                        curTarg = gn;
 #ifdef USE_META
-                       if (useMeta && GNode_ShouldExecute(gn)) {
+                       if (useMeta && GNode_ShouldExecute(gn))
                                meta_job_start(NULL, gn);
-                       }
 #endif
                        RunCommands(gn);
                        curTarg = NULL;
diff -r ab7d204cb449 -r 3b72590b8820 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat Jan 08 09:02:47 2022 +0000
+++ b/usr.bin/make/job.c        Sat Jan 08 09:53:44 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.447 2022/01/07 19:24:27 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.448 2022/01/08 09:53:44 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.447 2022/01/07 19:24:27 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.448 2022/01/08 09:53:44 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1446,9 +1446,8 @@
                sigset_t tmask;
 
 #ifdef USE_META
-               if (useMeta) {
+               if (useMeta)
                        meta_job_child(job);
-               }
 #endif
                /*
                 * Reset all signal handlers; this is necessary because we
@@ -1528,9 +1527,8 @@
        Trace_Log(JOBSTART, job);
 
 #ifdef USE_META
-       if (useMeta) {
+       if (useMeta)
                meta_job_parent(job, cpid);
-       }
 #endif
 
        /*
@@ -2136,9 +2134,8 @@
                 * than job->inPollfd.
                 */
                if (useMeta && job->inPollfd != &fds[i]) {
-                       if (meta_job_event(job) <= 0) {
+                       if (meta_job_event(job) <= 0)
                                fds[i].events = 0;      /* never mind */
-                       }
                }
 #endif
                if (--nready == 0)
diff -r ab7d204cb449 -r 3b72590b8820 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sat Jan 08 09:02:47 2022 +0000
+++ b/usr.bin/make/make.c       Sat Jan 08 09:53:44 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.250 2021/12/27 18:26:22 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.251 2022/01/08 09:53:44 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -104,7 +104,7 @@
 #include "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.250 2021/12/27 18:26:22 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.251 2022/01/08 09:53:44 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -370,9 +370,8 @@
        }
 
 #ifdef USE_META
-       if (useMeta) {
+       if (useMeta)
                oodate = meta_oodate(gn, oodate);
-       }
 #endif
 
        /*



Home | Main Index | Thread Index | Old Index