aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2005-02-07 11:27:47 +0000
committerHartmut Brandt <harti@FreeBSD.org>2005-02-07 11:27:47 +0000
commit46ca4347374ab1d846340cda3f2725c9196366b5 (patch)
tree8d3e420e3ee021620eeb19049420c02d159537a6 /usr.bin/make/parse.c
parent8460448167f62f2e894d5353d0f69216b97c44ed (diff)
Notes
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 2db0d8afce5a..64150b32db04 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1433,7 +1433,7 @@ Parse_DoVar(char *line, GNode *ctxt)
} else if (type == VAR_SHELL) {
Boolean freeCmd = FALSE; /* TRUE if the command needs to be freed, i.e.
* if any variable expansion was performed */
- char *res;
+ Buffer *buf;
const char *error;
if (strchr(cp, '$') != NULL) {
@@ -1446,9 +1446,9 @@ Parse_DoVar(char *line, GNode *ctxt)
freeCmd = TRUE;
}
- res = Cmd_Exec(cp, &error);
- Var_Set(line, res, ctxt);
- free(res);
+ buf = Cmd_Exec(cp, &error);
+ Var_Set(line, Buf_GetAll(buf, NULL), ctxt);
+ Buf_Destroy(buf, TRUE);
if (error)
Parse_Error(PARSE_WARNING, error, cp);