Author: ache Date: Mon Jul 18 19:20:49 2016 New Revision: 303011 URL: https://svnweb.freebsd.org/changeset/base/303011
Log: Change patch from r303004 case 3. According to POSIX gl_errfunc should be called first, then GLOB_ERR should be considered. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Mon Jul 18 18:24:31 2016 (r303010) +++ head/lib/libc/gen/glob.c Mon Jul 18 19:20:49 2016 (r303011) @@ -714,9 +714,7 @@ glob3(Char *pathbuf, Char *pathend, Char if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { if (errno == ENOENT || errno == ENOTDIR) return (0); - if (pglob->gl_flags & GLOB_ERR) - return (GLOB_ABORTED); - if (pglob->gl_errfunc) { + if (pglob->gl_errfunc != NULL) { if (g_Ctoc(pathbuf, buf, sizeof(buf))) { errno = 0; return (GLOB_NOSPACE); @@ -724,6 +722,8 @@ glob3(Char *pathbuf, Char *pathend, Char if (pglob->gl_errfunc(buf, errno)) return (GLOB_ABORTED); } + if (pglob->gl_flags & GLOB_ERR) + return (GLOB_ABORTED); return (0); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"