svn commit: r244356 - stable/9/lib/libc/gen

Jilles Tjoelker jilles at FreeBSD.org
Mon Dec 17 12:26:11 UTC 2012


Author: jilles
Date: Mon Dec 17 12:26:10 2012
New Revision: 244356
URL: http://svnweb.freebsd.org/changeset/base/244356

Log:
  MFC r239150: nftw(): Do not check the maxfds argument against OPEN_MAX.
  
  Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
  to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
  does not require us to check this.
  
  PR:		95239
  Submitted by:	Todd Miller

Modified:
  stable/9/lib/libc/gen/nftw.c
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/gen/nftw.c
==============================================================================
--- stable/9/lib/libc/gen/nftw.c	Mon Dec 17 11:12:09 2012	(r244355)
+++ stable/9/lib/libc/gen/nftw.c	Mon Dec 17 12:26:10 2012	(r244356)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include <errno.h>
 #include <fts.h>
 #include <ftw.h>
-#include <limits.h>
 
 int
 nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
@@ -47,7 +46,7 @@ nftw(const char *path, int (*fn)(const c
 	int error = 0, ftsflags, fnflag, postorder, sverrno;
 
 	/* XXX - nfds is currently unused */
-	if (nfds < 1 || nfds > OPEN_MAX) {
+	if (nfds < 1) {
 		errno = EINVAL;
 		return (-1);
 	}


More information about the svn-src-stable-9 mailing list