Date: Sat, 30 Jul 2016 02:09:11 +0000 (UTC) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303530 - head/lib/libc/gen Message-ID: <201607300209.u6U29BXC082700@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ache Date: Sat Jul 30 02:09:11 2016 New Revision: 303530 URL: https://svnweb.freebsd.org/changeset/base/303530 Log: Reset errno for readdirfunc() before contunue. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sat Jul 30 01:16:06 2016 (r303529) +++ head/lib/libc/gen/glob.c Sat Jul 30 02:09:11 2016 (r303530) @@ -781,8 +781,10 @@ glob3(Char *pathbuf, Char *pathend, Char } /* Initial DOT must be matched literally. */ - if (dp->d_name[0] == '.' && UNPROT(*pattern) != DOT) + if (dp->d_name[0] == '.' && UNPROT(*pattern) != DOT) { + errno = 0; continue; + } memset(&mbs, 0, sizeof(mbs)); dc = pathend; sc = dp->d_name; @@ -803,6 +805,7 @@ glob3(Char *pathbuf, Char *pathend, Char } if (too_long || !match(pathend, pattern, restpattern)) { *pathend = EOS; + errno = 0; continue; } err = glob2(pathbuf, --dc, pathend_last, restpattern,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607300209.u6U29BXC082700>