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): eliminate local variable in ParseModif...
details: https://anonhg.NetBSD.org/src/rev/b114a3cf6550
branches: trunk
changeset: 936720:b114a3cf6550
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 02 10:47:09 2020 +0000
description:
make(1): eliminate local variable in ParseModifierPart
The evaluation flags passed to the nested variables consist of 3 flags.
Therefore, (eflags & VARE_UNDEFERR) | (eflags & VARE_WANTRES) is
equivalent to (eflags & ~VARE_ASSIGN).
The variable name errnum was misleading anyway, just like the other
errnum from a few commits ago that had been renamed to errfmt.
diffstat:
usr.bin/make/var.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 9afac9d7c9da -r b114a3cf6550 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Aug 02 10:01:50 2020 +0000
+++ b/usr.bin/make/var.c Sun Aug 02 10:47:09 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.394 2020/08/02 10:01:50 rillig Exp $ */
+/* $NetBSD: var.c,v 1.395 2020/08/02 10:47:09 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.394 2020/08/02 10:01:50 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.395 2020/08/02 10:47:09 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.394 2020/08/02 10:01:50 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.395 2020/08/02 10:47:09 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1748,7 +1748,6 @@
) {
char *rstr;
Buffer buf;
- VarEvalFlags errnum = eflags & VARE_UNDEFERR;
Buf_InitZ(&buf, 0);
@@ -1792,8 +1791,7 @@
int len;
void *freeIt;
- cp2 = Var_Parse(p, ctxt, errnum | (eflags & VARE_WANTRES),
- &len, &freeIt);
+ cp2 = Var_Parse(p, ctxt, eflags & ~VARE_ASSIGN, &len, &freeIt);
Buf_AddStr(&buf, cp2);
free(freeIt);
p += len;
Home |
Main Index |
Thread Index |
Old Index