From 83b1b6d8faca6d279867c1c76f75e89786b76f4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Jul 2000 08:22:44 +0000 Subject: Update. 2000-07-04 Ulrich Drepper * spinlock.c (__pthread_unlock): Properly place write barrier. Patch by Kaz Kylheku . --- posix/fnmatch_loop.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'posix/fnmatch_loop.c') diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 831bd0631a..3a6dffb1e4 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -176,8 +176,8 @@ FCT (pattern, string, no_leading_period, flags) case L('['): { - /* Nonzero if the sense of the character class is inverted. */ static int posixly_correct; + /* Nonzero if the sense of the character class is inverted. */ register int not; CHAR cold; @@ -273,6 +273,7 @@ FCT (pattern, string, no_leading_period, flags) || (STREQ (str, L("xdigit")) && ISXDIGIT ((UCHAR) *n))) goto matched; #endif + c = *p++; } else if (c == L('\0')) /* [ (unterminated) loses. */ @@ -415,13 +416,14 @@ FCT (pattern, string, no_leading_period, flags) matched: /* Skip the rest of the [...] that already matched. */ - while (c != L(']')) + do { + c = *p++; + if (c == L('\0')) /* [... (unterminated) loses. */ return FNM_NOMATCH; - c = *p++; if (!(flags & FNM_NOESCAPE) && c == L('\\')) { if (*p == L('\0')) @@ -439,6 +441,7 @@ FCT (pattern, string, no_leading_period, flags) c = *p; } } + while (c != L(']')); if (not) return FNM_NOMATCH; } -- cgit v1.2.3