Author: ache
Date: Sun Jul 31 02:28:50 2016
New Revision: 303565
URL: https://svnweb.freebsd.org/changeset/base/303565

Log:
  In addition to prev. commit. Since potentially glob2() can return error
  without setting errno, restore errno before its call.

Modified:
  head/lib/libc/gen/glob.c

Modified: head/lib/libc/gen/glob.c
==============================================================================
--- head/lib/libc/gen/glob.c    Sun Jul 31 01:14:06 2016        (r303564)
+++ head/lib/libc/gen/glob.c    Sun Jul 31 02:28:50 2016        (r303565)
@@ -821,6 +821,8 @@ glob3(Char *pathbuf, Char *pathend, Char
                        errno = 0;
                        continue;
                }
+               if (errno == 0)
+                       errno = saverrno;
                err = glob2(pathbuf, --dc, pathend_last, restpattern,
                    pglob, limit);
                if (err)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to