svn commit: r317913 - head/lib/libc/gen

Jilles Tjoelker jilles at FreeBSD.org
Sun May 7 19:52:58 UTC 2017


Author: jilles
Date: Sun May  7 19:52:56 2017
New Revision: 317913
URL: https://svnweb.freebsd.org/changeset/base/317913

Log:
  glob: Fix comment about collapsing asterisks after r317749.
  
  After r317749, collapsing adjacent asterisks is still required, but for a
  different reason.

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

Modified: head/lib/libc/gen/glob.c
==============================================================================
--- head/lib/libc/gen/glob.c	Sun May  7 19:49:46 2017	(r317912)
+++ head/lib/libc/gen/glob.c	Sun May  7 19:52:56 2017	(r317913)
@@ -581,7 +581,8 @@ glob0(const Char *pattern, glob_t *pglob
 		case STAR:
 			pglob->gl_flags |= GLOB_MAGCHAR;
 			/* collapse adjacent stars to one,
-			 * to avoid exponential behavior
+			 * to ensure "**" at the end continues to match the
+			 * empty string
 			 */
 			if (bufnext == patbuf || bufnext[-1] != M_ALL)
 			    *bufnext++ = M_ALL;


More information about the svn-src-all mailing list