Module Name:    src
Committed By:   rillig
Date:           Mon Jan 24 20:54:54 UTC 2022

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

Log Message:
make: remove unsatisfiable condition in VarSubstExpr

At that point, emode can have only 2 values, none of which is
VARE_UNDEFERR.

No binary change since GCC had figured this out all the time, it just
didn't reveal this little secret.


To generate a diff of this commit:
cvs rdiff -u -r1.1003 -r1.1004 src/usr.bin/make/var.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/var.c
diff -u src/usr.bin/make/var.c:1.1003 src/usr.bin/make/var.c:1.1004
--- src/usr.bin/make/var.c:1.1003	Mon Jan 24 20:49:55 2022
+++ src/usr.bin/make/var.c	Mon Jan 24 20:54:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1003 2022/01/24 20:49:55 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1004 2022/01/24 20:54:54 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1003 2022/01/24 20:49:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1004 2022/01/24 20:54:54 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -4626,7 +4626,7 @@ VarSubstExpr(const char **pp, Buffer *bu
 	if (val.str == var_Error || val.str == varUndefined) {
 		if (!VarEvalMode_ShouldKeepUndef(emode)) {
 			p = nested_p;
-		} else if (emode == VARE_UNDEFERR || val.str == var_Error) {
+		} else if (val.str == var_Error) {
 
 			/*
 			 * XXX: This condition is wrong.  If val == var_Error,

Reply via email to