Module Name: src
Committed By: rillig
Date: Sat Nov 21 15:02:52 UTC 2020
Modified Files:
src/usr.bin/make: var.c
Log Message:
make(1): rename local variable in Var_Subst
To generate a diff of this commit:
cvs rdiff -u -r1.689 -r1.690 src/usr.bin/make/var.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.689 src/usr.bin/make/var.c:1.690
--- src/usr.bin/make/var.c:1.689 Tue Nov 17 20:11:02 2020
+++ src/usr.bin/make/var.c Sat Nov 21 15:02:52 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.689 2020/11/17 20:11:02 rillig Exp $ */
+/* $NetBSD: var.c,v 1.690 2020/11/21 15:02:52 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.689 2020/11/17 20:11:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.690 2020/11/21 15:02:52 rillig Exp $");
#define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
#define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -4022,26 +4022,26 @@ VarParseResult
Var_Subst(const char *str, GNode *ctxt, VarEvalFlags eflags, char **out_res)
{
const char *p = str;
- Buffer buf; /* Buffer for forming things */
+ Buffer res;
/* Set true if an error has already been reported,
* to prevent a plethora of messages when recursing */
/* XXX: Why is the 'static' necessary here? */
static Boolean errorReported;
- Buf_Init(&buf);
+ Buf_Init(&res);
errorReported = FALSE;
while (*p != '\0') {
if (p[0] == '$' && p[1] == '$') {
/* A dollar sign may be escaped with another dollar sign. */
if (save_dollars && (eflags & VARE_KEEP_DOLLAR))
- Buf_AddByte(&buf, '$');
- Buf_AddByte(&buf, '$');
+ Buf_AddByte(&res, '$');
+ Buf_AddByte(&res, '$');
p += 2;
} else if (p[0] == '$') {
- VarSubstNested(&p, &buf, ctxt, eflags, &errorReported);
+ VarSubstNested(&p, &res, ctxt, eflags, &errorReported);
} else {
/*
@@ -4052,11 +4052,11 @@ Var_Subst(const char *str, GNode *ctxt,
for (p++; *p != '$' && *p != '\0'; p++)
continue;
- Buf_AddBytesBetween(&buf, plainStart, p);
+ Buf_AddBytesBetween(&res, plainStart, p);
}
}
- *out_res = Buf_DestroyCompact(&buf);
+ *out_res = Buf_DestroyCompact(&res);
return VPR_OK;
}