mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Allow empty case/esac statements; POSIX requires this, and recent versions
of autoconf are generating scripts that use this feature. PR: 43275 35879 Submitted by: Dan Nelson <[email protected]>
This commit is contained in:
1 parent
045df95d10
commit
e00e16ad7f
1 file changed
+2
-2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104202
+2
-2
@@ -429,7 +429,7 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
cpp = &n1->ncase.cases;
|
||||
noaliases = 1; /* turn off alias expansion */
|
||||
checkkwd = 2, readtoken();
|
||||
do {
|
||||
while (lasttoken != TESAC) {
|
||||
*cpp = cp = (union node *)stalloc(sizeof (struct nclist));
|
||||
cp->type = NCLIST;
|
||||
app = &cp->nclist.pattern;
|
||||
@@ -456,7 +456,7 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
|
||||
checkkwd = 2, readtoken();
|
||||
}
|
||||
cpp = &cp->nclist.next;
|
||||
} while(lasttoken != TESAC);
|
||||
}
|
||||
noaliases = 0; /* reset alias expansion */
|
||||
*cpp = NULL;
|
||||
checkkwd = 1;
|
||||
|
||||
Reference in new issue
Block a user