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): inline and rename variables in ApplyMo...
details: https://anonhg.NetBSD.org/src/rev/bb693010e2c0
branches: trunk
changeset: 945619:bb693010e2c0
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Nov 02 16:38:47 2020 +0000
description:
make(1): inline and rename variables in ApplyModifiersIndirect
diffstat:
usr.bin/make/var.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r 501d46402b8b -r bb693010e2c0 usr.bin/make/var.c
--- a/usr.bin/make/var.c Mon Nov 02 12:14:59 2020 +0000
+++ b/usr.bin/make/var.c Mon Nov 02 16:38:47 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.641 2020/11/01 23:17:40 rillig Exp $ */
+/* $NetBSD: var.c,v 1.642 2020/11/02 16:38:47 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.641 2020/11/01 23:17:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.642 2020/11/02 16:38:47 rillig Exp $");
#define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
#define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -3273,11 +3273,10 @@
) {
const char *p = *inout_p;
const char *nested_p = p;
- void *freeIt;
+ void *rval_freeIt;
const char *rval;
- char c;
-
- (void)Var_Parse(&nested_p, st->ctxt, st->eflags, &rval, &freeIt);
+
+ (void)Var_Parse(&nested_p, st->ctxt, st->eflags, &rval, &rval_freeIt);
/* TODO: handle errors */
/*
@@ -3286,13 +3285,13 @@
* is not accepted, but ${VAR:${M_1}:${M_2}} is.
*/
if (rval[0] != '\0' &&
- (c = *nested_p) != '\0' && c != ':' && c != st->endc) {
+ *nested_p != '\0' && *nested_p != ':' && *nested_p != st->endc) {
if (DEBUG(LINT))
Parse_Error(PARSE_FATAL,
"Missing delimiter ':' after indirect modifier \"%.*s\"",
(int)(nested_p - p), p);
- free(freeIt);
+ free(rval_freeIt);
/* XXX: apply_mods doesn't sound like "not interested". */
/* XXX: Why is the indirect modifier parsed again by
* apply_mods? If any, p should be advanced to nested_p. */
@@ -3311,12 +3310,12 @@
if (st->val == var_Error
|| (st->val == varUndefined && !(st->eflags & VARE_UNDEFERR))
|| *rval_pp != '\0') {
- free(freeIt);
+ free(rval_freeIt);
*inout_p = p;
return AMIR_OUT; /* error already reported */
}
}
- free(freeIt);
+ free(rval_freeIt);
if (*p == ':')
p++;
Home |
Main Index |
Thread Index |
Old Index