From owner-svn-src-all@FreeBSD.ORG Thu Aug 9 15:04:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F27E41065670; Thu, 9 Aug 2012 15:04:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDBEB8FC24; Thu, 9 Aug 2012 15:04:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q79F467e021915; Thu, 9 Aug 2012 15:04:06 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q79F46rO021913; Thu, 9 Aug 2012 15:04:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201208091504.q79F46rO021913@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 9 Aug 2012 15:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239150 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 15:04:07 -0000 Author: jilles Date: Thu Aug 9 15:04:06 2012 New Revision: 239150 URL: http://svn.freebsd.org/changeset/base/239150 Log: 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: head/lib/libc/gen/nftw.c Modified: head/lib/libc/gen/nftw.c ============================================================================== --- head/lib/libc/gen/nftw.c Thu Aug 9 14:46:52 2012 (r239149) +++ head/lib/libc/gen/nftw.c Thu Aug 9 15:04:06 2012 (r239150) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include 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); }