Date: Sun, 31 Jul 2016 02:28:51 +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: r303565 - head/lib/libc/gen Message-ID: <201607310228.u6V2Sp6e026519@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607310228.u6V2Sp6e026519>