From 8ef15f9322dd4314ae26abf4e1290844850ff155 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 26 Sep 2022 20:02:38 -0400 Subject: 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 Reviewed-by: Brian Behlendorf Signed-off-by: Richard Yao Closes #13871 --- module/os/linux/zfs/zfs_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/os/linux/zfs/zfs_acl.c') 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); -- cgit v1.2.3