Module Name:    src
Committed By:   rillig
Date:           Sat Jan  8 09:53:44 UTC 2022

Modified Files:
        src/usr.bin/make: compat.c job.c make.c

Log Message:
make: remove redundant braces

No binary change, except for assertion line numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/usr.bin/make/compat.c
cvs rdiff -u -r1.447 -r1.448 src/usr.bin/make/job.c
cvs rdiff -u -r1.250 -r1.251 src/usr.bin/make/make.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.236 src/usr.bin/make/compat.c:1.237
--- src/usr.bin/make/compat.c:1.236	Fri Jan  7 19:24:27 2022
+++ src/usr.bin/make/compat.c	Sat Jan  8 09:53:44 2022
@@ -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 @@ Compat_RunCommand(const char *cmdp, GNod
 	}
 
 #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 @@ Compat_RunCommand(const char *cmdp, GNod
 	LstNode_SetNull(ln);
 
 #ifdef USE_META
-	if (useMeta) {
+	if (useMeta)
 		meta_compat_parent(cpid);
-	}
 #endif
 
 	/*
@@ -405,9 +399,8 @@ Compat_RunCommand(const char *cmdp, GNod
 	} 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 @@ Compat_RunCommand(const char *cmdp, GNod
 	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 @@ MakeUnmade(GNode *gn, GNode *pgn)
 		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;

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.447 src/usr.bin/make/job.c:1.448
--- src/usr.bin/make/job.c:1.447	Fri Jan  7 19:24:27 2022
+++ src/usr.bin/make/job.c	Sat Jan  8 09:53:44 2022
@@ -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 @@ JobExec(Job *job, char **argv)
 		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 @@ JobExec(Job *job, char **argv)
 	Trace_Log(JOBSTART, job);
 
 #ifdef USE_META
-	if (useMeta) {
+	if (useMeta)
 		meta_job_parent(job, cpid);
-	}
 #endif
 
 	/*
@@ -2136,9 +2134,8 @@ Job_CatchOutput(void)
 		 * 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)

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.250 src/usr.bin/make/make.c:1.251
--- src/usr.bin/make/make.c:1.250	Mon Dec 27 18:26:22 2021
+++ src/usr.bin/make/make.c	Sat Jan  8 09:53:44 2022
@@ -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 @@ GNode_IsOODate(GNode *gn)
 	}
 
 #ifdef USE_META
-	if (useMeta) {
+	if (useMeta)
 		oodate = meta_oodate(gn, oodate);
-	}
 #endif
 
 	/*

Reply via email to