Module Name:    src
Committed By:   rillig
Date:           Thu Sep  3 18:53:46 UTC 2020

Modified Files:
        src/usr.bin/make: var.c

Log Message:
make(1): migrate ApplyModifier_Defined to Var_ParsePP


To generate a diff of this commit:
cvs rdiff -u -r1.485 -r1.486 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.485 src/usr.bin/make/var.c:1.486
--- src/usr.bin/make/var.c:1.485	Thu Sep  3 18:19:15 2020
+++ src/usr.bin/make/var.c	Thu Sep  3 18:53:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.485 2020/09/03 18:19:15 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.486 2020/09/03 18:53:46 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.485 2020/09/03 18:19:15 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.486 2020/09/03 18:53:46 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.485 2020/09/03 18:19:15 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.486 2020/09/03 18:53:46 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2029,14 +2029,12 @@ ApplyModifier_Defined(const char **pp, A
 
 	/* Nested variable expression */
 	if (*p == '$') {
-	    const char *cp2;
-	    int len;
-	    void *freeIt;
+	    const char *nested_val;
+	    void *nested_val_freeIt;
 
-	    cp2 = Var_Parse(p, st->ctxt, eflags, &len, &freeIt);
-	    Buf_AddStr(&buf, cp2);
-	    free(freeIt);
-	    p += len;
+	    nested_val = Var_ParsePP(&p, st->ctxt, eflags, &nested_val_freeIt);
+	    Buf_AddStr(&buf, nested_val);
+	    free(nested_val_freeIt);
 	    continue;
 	}
 

Reply via email to