From owner-svn-src-head@FreeBSD.ORG Thu Jun 3 14:15:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 340A81065676; Thu, 3 Jun 2010 14:15:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BF6C8FC12; Thu, 3 Jun 2010 14:15:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o53EF8Za001811; Thu, 3 Jun 2010 14:15:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o53EF8Ku001809; Thu, 3 Jun 2010 14:15:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201006031415.o53EF8Ku001809@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 3 Jun 2010 14:15:08 +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: r208782 - head/lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 14:15:09 -0000 Author: trasz Date: Thu Jun 3 14:15:08 2010 New Revision: 208782 URL: http://svn.freebsd.org/changeset/base/208782 Log: The 'acl_cnt' field is unsigned; no point in checking if it's >= 0. Found with: Coverity Prevent CID: 6193 Modified: head/lib/libc/posix1e/acl_entry.c Modified: head/lib/libc/posix1e/acl_entry.c ============================================================================== --- head/lib/libc/posix1e/acl_entry.c Thu Jun 3 13:45:27 2010 (r208781) +++ head/lib/libc/posix1e/acl_entry.c Thu Jun 3 14:15:08 2010 (r208782) @@ -87,7 +87,7 @@ acl_create_entry_np(acl_t *acl_p, acl_en acl_int = &(*acl_p)->ats_acl; - if ((acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) || (acl_int->acl_cnt < 0)) { + if (acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) { errno = EINVAL; return (-1); }