diff options
author | ache <ache@FreeBSD.org> | 2005-09-14 19:14:32 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2005-09-14 19:14:32 +0000 |
commit | 973ad4fc3582861f5955c3b1563573f33f92f24a (patch) | |
tree | ec942138315e3974dadcd7e2398cdc6f8a58ef4e /lib | |
parent | 3527686898778cdc3b754dabb7dcbe74b810134e (diff) | |
download | FreeBSD-src-973ad4fc3582861f5955c3b1563573f33f92f24a.zip FreeBSD-src-973ad4fc3582861f5955c3b1563573f33f92f24a.tar.gz |
Don't reuse *pl to skip [], it is already used for {} parts in the loop above
(submitted patch slightly modified)
PR: 86038
Submitted by: Gerd Rausch <gerd@juniper.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/glob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index f68623b..8e5ee69 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -277,7 +277,7 @@ globexp2(ptr, pattern, pglob, rv, limit) { int i; Char *lm, *ls; - const Char *pe, *pm, *pl; + const Char *pe, *pm, *pm1, *pl; Char patbuf[MAXPATHLEN]; /* copy part up to the brace */ @@ -318,14 +318,14 @@ globexp2(ptr, pattern, pglob, rv, limit) switch (*pm) { case LBRACKET: /* Ignore everything between [] */ - for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++) + for (pm1 = pm++; *pm != RBRACKET && *pm != EOS; pm++) continue; if (*pm == EOS) { /* * We could not find a matching RBRACKET. * Ignore and just look for RBRACE */ - pm = pl; + pm = pm1; } break; |