Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): don't pretend to expand CondParser_Eval



details:   https://anonhg.NetBSD.org/src/rev/cc16e8f79043
branches:  trunk
changeset: 957902:cc16e8f79043
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 14 20:39:35 2020 +0000

description:
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.

diffstat:

 usr.bin/make/cond.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d9a9965311f8 -r cc16e8f79043 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Mon Dec 14 20:28:09 2020 +0000
+++ b/usr.bin/make/cond.c       Mon Dec 14 20:39:35 2020 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index