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 local variable in ApplyModifier...



details:   https://anonhg.NetBSD.org/src/rev/5b4c2ec551ed
branches:  trunk
changeset: 957808:5b4c2ec551ed
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 12 00:53:23 2020 +0000

description:
make(1): inline local variable in ApplyModifiersIndirect

diffstat:

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

diffs (33 lines):

diff -r 6d0593315f20 -r 5b4c2ec551ed usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Dec 12 00:42:35 2020 +0000
+++ b/usr.bin/make/var.c        Sat Dec 12 00:53:23 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.721 2020/12/12 00:42:35 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.722 2020/12/12 00:53:23 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.721 2020/12/12 00:42:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.722 2020/12/12 00:53:23 rillig Exp $");
 
 /* A string that may need to be freed after use. */
 typedef struct FStr {
@@ -3421,12 +3421,11 @@
            mods, (int)(p - *pp), *pp);
 
        if (mods[0] != '\0') {
-               const char *rval_p = mods;
-               st->val = ApplyModifiers(&rval_p, st->val, '\0', '\0',
+               st->val = ApplyModifiers(&mods, st->val, '\0', '\0',
                    st->var, &st->exprFlags, st->ctxt, st->eflags,
                    inout_freeIt);
                if (st->val == var_Error || st->val == varUndefined ||
-                   *rval_p != '\0') {
+                   *mods != '\0') {
                        free(mods_freeIt);
                        *pp = p;
                        return AMIR_OUT;        /* error already reported */



Home | Main Index | Thread Index | Old Index