aboutsummaryrefslogtreecommitdiff
path: root/posix/fnmatch_loop.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-04 08:22:44 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-04 08:22:44 +0000
commit83b1b6d8faca6d279867c1c76f75e89786b76f4f (patch)
treed76728853dc9f8d2852e035c865e5e9732d65c81 /posix/fnmatch_loop.c
parent0d6af3a86d34a5b32c46353fdc863216c1a44baf (diff)
downloadglibc-83b1b6d8faca6d279867c1c76f75e89786b76f4f.tar
glibc-83b1b6d8faca6d279867c1c76f75e89786b76f4f.tar.gz
glibc-83b1b6d8faca6d279867c1c76f75e89786b76f4f.tar.bz2
glibc-83b1b6d8faca6d279867c1c76f75e89786b76f4f.zip
Update.
2000-07-04 Ulrich Drepper <drepper@redhat.com> * spinlock.c (__pthread_unlock): Properly place write barrier. Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r--posix/fnmatch_loop.c9
1 files changed, 6 insertions, 3 deletions
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;
}