summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-01-22 18:17:44 +0000
committerru <ru@FreeBSD.org>2004-01-22 18:17:44 +0000
commit82cb47ce10b1d95ba2a76209046c121736a5dddb (patch)
treee26ca1b91ef0863a43e02fba646e4346bacf364d /usr.bin
parentd3f727a8981c3ae3c3ef4a9a0a5c8ef64b14eebe (diff)
downloadFreeBSD-src-82cb47ce10b1d95ba2a76209046c121736a5dddb.zip
FreeBSD-src-82cb47ce10b1d95ba2a76209046c121736a5dddb.tar.gz
Fixed broken logic when parsing double quotes.
PR: bin/61673 MFC after: 1 month
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/str.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index a6fdb63..23fc835 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -160,24 +160,15 @@ brk_string(char *str, int *store_argc, Boolean expand)
case '"':
case '\'':
if (inquote) {
- if (inquote == ch)
+ if (ch == inquote)
inquote = '\0';
else
break;
- } else {
+ } else
inquote = (char) ch;
- /* Don't miss "" or '' */
- if (start == NULL && p[1] == inquote) {
- start = t + 1;
- break;
- }
- }
- if (!expand) {
- if (!start)
- start = t;
- *t++ = ch;
- }
- continue;
+ if (expand)
+ continue;
+ break;
case ' ':
case '\t':
case '\n':
OpenPOWER on IntegriCloud