diff options
author | Richard Yao <[email protected]> | 2022-09-26 20:02:38 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-26 17:02:38 -0700 |
commit | 8ef15f9322dd4314ae26abf4e1290844850ff155 (patch) | |
tree | 9a2eab84fee567cfc0886ed60863755fa3821258 /module/os/linux/zfs/zfs_acl.c | |
parent | 52afc3443d164101eea7fbded0d21c079a0d6a0e (diff) |
Cleanup: Remove ineffective unsigned comparisons against 0
Coverity found a number of places where we either do MAX(unsigned, 0) or
do assertions that a unsigned variable is >= 0. These do nothing, so
let us drop them all.
It also found a spot where we do `if (unsigned >= 0 && ...)`. Let us
also drop the unsigned >= 0 check.
Reviewed-by: Neal Gompa <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #13871
Diffstat (limited to 'module/os/linux/zfs/zfs_acl.c')
-rw-r--r-- | module/os/linux/zfs/zfs_acl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index 4fd071d3c..5935403b4 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -525,7 +525,7 @@ zfs_acl_valid_ace_type(uint_t type, uint_t flags) entry_type == ACE_EVERYONE || entry_type == 0 || entry_type == ACE_IDENTIFIER_GROUP); default: - if (type >= MIN_ACE_TYPE && type <= MAX_ACE_TYPE) + if (type <= MAX_ACE_TYPE) return (B_TRUE); } return (B_FALSE); |