Date: Thu, 3 Jun 2010 14:15:08 +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: r208782 - head/lib/libc/posix1e Message-ID: <201006031415.o53EF8Ku001809@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006031415.o53EF8Ku001809>