Module Name:    src
Committed By:   rillig
Date:           Mon Oct 26 22:51:56 UTC 2020

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

Log Message:
make(1): remove unnecessary double negation in Job_ParseShell


To generate a diff of this commit:
cvs rdiff -u -r1.290 -r1.291 src/usr.bin/make/job.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/job.c
diff -u src/usr.bin/make/job.c:1.290 src/usr.bin/make/job.c:1.291
--- src/usr.bin/make/job.c:1.290	Mon Oct 26 21:34:10 2020
+++ src/usr.bin/make/job.c	Mon Oct 26 22:51:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.290 2020/10/26 21:34:10 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.291 2020/10/26 22:51:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.290 2020/10/26 21:34:10 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.291 2020/10/26 22:51:56 rillig Exp $");
 
 /* A shell defines how the commands are run.  All commands for a target are
  * written into a single file, which is then given to the shell to execute
@@ -2331,8 +2331,8 @@ Job_ParseShell(char *line)
 		newShell.exit = arg + 8;
 	    } else if (strncmp(arg, "hasErrCtl=", 10) == 0) {
 		char c = arg[10];
-		newShell.hasErrCtl = !((c != 'Y') && (c != 'y') &&
-				       (c != 'T') && (c != 't'));
+		newShell.hasErrCtl = c == 'Y' || c == 'y' ||
+				     c == 'T' || c == 't';
 	    } else if (strncmp(arg, "newline=", 8) == 0) {
 		newShell.newline = arg + 8;
 	    } else if (strncmp(arg, "check=", 6) == 0) {

Reply via email to