summaryrefslogtreecommitdiff
path: root/posix/fnmatch.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
commit8833066b122427710a9e14a888ce6cfa862332d3 (patch)
tree29591019d695919417b3698618d6a342e97381d6 /posix/fnmatch.c
parentfedca46896bdb702cb988837a0c2c5447e72ba2b (diff)
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'posix/fnmatch.c')
-rw-r--r--posix/fnmatch.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index c6cdb88772..4baef9e69b 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.