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:
parent
d243a85e99
commit
18c12a53a1
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user