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): rename local variable in Var_Subst



details:   https://anonhg.NetBSD.org/src/rev/db991fdde4bf
branches:  trunk
changeset: 946215:db991fdde4bf
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 21 15:02:52 2020 +0000

description:
make(1): rename local variable in Var_Subst

diffstat:

 usr.bin/make/var.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r ec35ace9b418 -r db991fdde4bf usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Nov 21 14:59:11 2020 +0000
+++ b/usr.bin/make/var.c        Sat Nov 21 15:02:52 2020 +0000
@@ -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 @@
 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 @@
 
            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;
 }
 



Home | Main Index | Thread Index | Old Index