From: Ulrich Drepper Date: Sat, 27 Mar 2010 12:48:17 +0000 (-0700) Subject: Fix one more issue with the glob patch. X-Git-Tag: fedora/glibc-2.11.90-17~2^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5f3b0f830920ae31e24cad8fe5d877bba556764;p=thirdparty%2Fglibc.git Fix one more issue with the glob patch. --- diff --git a/ChangeLog b/ChangeLog index d0208712310..0969ca2de1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-03-27 Ulrich Drepper + + * posix/glob.c (glob): Initialize oldcount early, too. + 2010-03-26 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/fcntl.c: Define miss_F_GETOWN_EX diff --git a/posix/glob.c b/posix/glob.c index 3ae055d4301..e410d50ffec 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -436,6 +436,8 @@ glob (pattern, flags, errfunc, pglob) } } + oldcount = pglob->gl_pathc + pglob->gl_offs; + /* Find the filename. */ filename = strrchr (pattern, '/'); #if defined __MSDOS__ || defined WINDOWS32 @@ -553,8 +555,6 @@ glob (pattern, flags, errfunc, pglob) } } - oldcount = pglob->gl_pathc + pglob->gl_offs; - #ifndef VMS if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~') {