Module Name:    src
Committed By:   rillig
Date:           Mon Dec 14 20:39:35 UTC 2020

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

Log Message:
make(1): don't pretend to expand CondParser_Eval

At that point, the variable expression has already been expanded.  To
avoid the impression that the token might be relevant, pass FALSE
instead of TRUE.  No change of behavior.


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/usr.bin/make/cond.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/cond.c
diff -u src/usr.bin/make/cond.c:1.222 src/usr.bin/make/cond.c:1.223
--- src/usr.bin/make/cond.c:1.222	Sat Dec 12 00:33:25 2020
+++ src/usr.bin/make/cond.c	Mon Dec 14 20:39:35 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.222 2020/12/12 00:33:25 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.223 2020/12/14 20:39:35 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -94,7 +94,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.222 2020/12/12 00:33:25 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.223 2020/12/14 20:39:35 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -1038,7 +1038,7 @@ CondParser_Eval(CondParser *par, Boolean
 	if (res != TOK_FALSE && res != TOK_TRUE)
 		return COND_INVALID;
 
-	if (CondParser_Token(par, TRUE /* XXX: Why TRUE? */) != TOK_EOF)
+	if (CondParser_Token(par, FALSE) != TOK_EOF)
 		return COND_INVALID;
 
 	*value = res == TOK_TRUE;

Reply via email to