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: remove unnecessary negation from CondPars...



details:   https://anonhg.NetBSD.org/src/rev/d29dd1d2ab70
branches:  trunk
changeset: 986992:d29dd1d2ab70
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 21 21:43:32 2021 +0000

description:
make: remove unnecessary negation from CondParser_StringExpr

No functional change.

diffstat:

 usr.bin/make/cond.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r d9fc90f7447d -r d29dd1d2ab70 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Tue Sep 21 21:39:32 2021 +0000
+++ b/usr.bin/make/cond.c       Tue Sep 21 21:43:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.274 2021/09/21 21:39:32 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.275 2021/09/21 21:43:32 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.274 2021/09/21 21:39:32 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.275 2021/09/21 21:43:32 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -421,9 +421,8 @@
        bool atStart;
        VarParseResult parseResult;
 
-       /* if we are in quotes, an undefined variable is ok */
-       emode = doEval && !quoted ? VARE_UNDEFERR
-           : doEval ? VARE_WANTRES
+       emode = doEval && quoted ? VARE_WANTRES
+           : doEval ? VARE_UNDEFERR
            : VARE_PARSE_ONLY;
 
        nested_p = par->p;



Home | Main Index | Thread Index | Old Index