diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-31 17:46:17 +0000 |
commit | 8833066b122427710a9e14a888ce6cfa862332d3 (patch) | |
tree | 29591019d695919417b3698618d6a342e97381d6 /posix/fnmatch.c | |
parent | fedca46896bdb702cb988837a0c2c5447e72ba2b (diff) | |
download | glibc-8833066b122427710a9e14a888ce6cfa862332d3.zip glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.gz glibc-8833066b122427710a9e14a888ce6cfa862332d3.tar.bz2 |
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'posix/fnmatch.c')
-rw-r--r-- | posix/fnmatch.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c index c6cdb88..4baef9e 100644 --- a/posix/fnmatch.c +++ b/posix/fnmatch.c @@ -351,10 +351,14 @@ fnmatch (pattern, string, flags) already done? */ return -1; if (p) - memset (&ps, '\0', sizeof (ps)); + { + memset (&ps, '\0', sizeof (ps)); + goto prepare_wpattern; + } } - if (__builtin_expect (p != NULL, 0)) + else { + prepare_wpattern: n = mbsrtowcs (NULL, &pattern, 0, &ps); if (__builtin_expect (n == (size_t) -1, 0)) /* Something wrong. @@ -383,10 +387,14 @@ fnmatch (pattern, string, flags) already done? */ return -1; if (p) - memset (&ps, '\0', sizeof (ps)); + { + memset (&ps, '\0', sizeof (ps)); + goto prepare_wstring; + } } - if (__builtin_expect (p != NULL, 0)) + else { + prepare_wstring: n = mbsrtowcs (NULL, &string, 0, &ps); if (__builtin_expect (n == (size_t) -1, 0)) /* Something wrong. |