diff options
author | harti <harti@FreeBSD.org> | 2005-05-12 15:10:45 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-05-12 15:10:45 +0000 |
commit | 0c5d8337ec86ffcf078fa2d0dbf12822294391b6 (patch) | |
tree | 32f5356987c426a7d224cb472bc0fdf38e43a876 /usr.bin/make/job.c | |
parent | 2df173ac684d874dc720572384772bde811f18f6 (diff) | |
download | FreeBSD-src-0c5d8337ec86ffcf078fa2d0dbf12822294391b6.zip FreeBSD-src-0c5d8337ec86ffcf078fa2d0dbf12822294391b6.tar.gz |
The first element of the vector built by brk_string() is never
used so there is no need to stuff the value of .MAKE into it,
which btw isn't set for quite a while already.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.239)
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r-- | usr.bin/make/job.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 8b83d33..dcffdf5 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -2822,7 +2822,6 @@ Job_ParseShell(char *line) while (isspace((unsigned char)*line)) { line++; } - words = brk_string(line, &wordCount, TRUE); memset(&newShell, 0, sizeof(newShell)); path = NULL; @@ -2831,8 +2830,9 @@ Job_ParseShell(char *line) * Parse the specification by keyword but skip the first word - it * is not set by brk_string. */ - wordCount--; + words = brk_string(line, &wordCount, TRUE); words++; + wordCount--; for (argc = wordCount, argv = words; argc != 0; argc--, argv++) { /* @@ -3310,6 +3310,11 @@ shellneed(char *cmd) if (strpbrk(cmd, sh_meta) != NULL) return (NULL); + /* + * Break the command into words to form an argument + * vector we can execute. brk_string sticks NULL + * in av[0], so we have to skip over it... + */ av = brk_string(cmd, NULL, TRUE); for (p = sh_builtin; *p != 0; p++) if (strcmp(av[1], *p) == 0) |