glob0 shouldn't set pglob->gl_matchc to 0, it's done by glob,
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 14 Oct 1993 01:43:41 +0000 (17:43 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Thu, 14 Oct 1993 01:43:41 +0000 (17:43 -0800)
and glob0 gets called recursively

SCCS-vsn: lib/libc/gen/glob.c 8.2

usr/src/lib/libc/gen/glob.c

index 9e85e17..6fc7273 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)glob.c     8.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)glob.c     8.2 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -375,10 +375,7 @@ glob0(pattern, pglob)
        Char *bufnext, patbuf[MAXPATHLEN+1];
 
        qpatnext = globtilde(pattern, patbuf, pglob);
        Char *bufnext, patbuf[MAXPATHLEN+1];
 
        qpatnext = globtilde(pattern, patbuf, pglob);
-
        oldpathc = pglob->gl_pathc;
        oldpathc = pglob->gl_pathc;
-       pglob->gl_matchc = 0;
-
        bufnext = patbuf;
 
        /* We don't need to check for buffer overflow any more. */
        bufnext = patbuf;
 
        /* We don't need to check for buffer overflow any more. */