Date: Thu, 3 Jun 2010 14:16:58 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208783 - head/lib/libc/posix1e Message-ID: <201006031416.o53EGw6F002232@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Jun 3 14:16:58 2010 New Revision: 208783 URL: http://svn.freebsd.org/changeset/base/208783 Log: The 'acl_cnt' field is unsigned; no point in checking if it's >= 0. Found with: Coverity Prevent CID: 6192 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 14:15:08 2010 (r208782) +++ head/lib/libc/posix1e/acl_entry.c Thu Jun 3 14:16:58 2010 (r208783) @@ -55,8 +55,7 @@ acl_create_entry(acl_t *acl_p, acl_entry * +1, because we are checking if there is space left for one more * entry. */ - 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006031416.o53EGw6F002232>