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

Found with:	Coverity Prevent
CID:		6193
This commit is contained in:
Edward Tomasz Napierala 2010-06-03 14:15:08 +00:00
parent ce9d79aa61
commit d243a85e99

View File

@ -87,7 +87,7 @@ acl_create_entry_np(acl_t *acl_p, acl_entry_t *entry_p, int offset)
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);
}