The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.

Found with:	Coverity Prevent
CID:		6192
This commit is contained in:
Edward Tomasz Napierala 2010-06-03 14:16:58 +00:00
parent d243a85e99
commit 18c12a53a1

View File

@ -55,8 +55,7 @@ acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p)
* +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);
}