Module Name:    src
Committed By:   rillig
Date:           Fri Dec 10 23:19:59 UTC 2021

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

Log Message:
make: do not expand operator token in CondParser_Or

At the point where CondParser_Or calls CondParser_Token, there was a
previous call to CondParser_And.  Due to this, the next token is already
stored in par->curr, and the parameter doEval is ignored.

Changing the argument from doEval to false makes the code similar to the
corresponding code in CondParser_And.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 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.286 src/usr.bin/make/cond.c:1.287
--- src/usr.bin/make/cond.c:1.286	Fri Dec 10 23:12:44 2021
+++ src/usr.bin/make/cond.c	Fri Dec 10 23:19:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.286 2021/12/10 23:12:44 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.287 2021/12/10 23:19:59 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.286 2021/12/10 23:12:44 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.287 2021/12/10 23:19:59 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -1017,7 +1017,7 @@ CondParser_Or(CondParser *par, bool doEv
 			res = CR_TRUE;
 			doEval = false;
 		}
-	} while ((op = CondParser_Token(par, doEval)) == TOK_OR);
+	} while ((op = CondParser_Token(par, false)) == TOK_OR);
 
 	CondParser_PushBack(par, op);
 	return res;

Reply via email to