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: do not expand operator token in CondParse...



details:   https://anonhg.NetBSD.org/src/rev/df6087284d18
branches:  trunk
changeset: 1027550:df6087284d18
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Dec 10 23:19:59 2021 +0000

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

diffstat:

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

diffs (27 lines):

diff -r 0a7251664cab -r df6087284d18 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Fri Dec 10 23:12:44 2021 +0000
+++ b/usr.bin/make/cond.c       Fri Dec 10 23:19:59 2021 +0000
@@ -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 @@
                        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;



Home | Main Index | Thread Index | Old Index