aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2022-09-26 20:02:38 -0400
committerGitHub <[email protected]>2022-09-26 17:02:38 -0700
commit8ef15f9322dd4314ae26abf4e1290844850ff155 (patch)
tree9a2eab84fee567cfc0886ed60863755fa3821258 /module/icp
parent52afc3443d164101eea7fbded0d21c079a0d6a0e (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/icp')
-rw-r--r--module/icp/algs/blake3/blake3_impl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/module/icp/algs/blake3/blake3_impl.c b/module/icp/algs/blake3/blake3_impl.c
index 5276fd88f..1692916ce 100644
--- a/module/icp/algs/blake3/blake3_impl.c
+++ b/module/icp/algs/blake3/blake3_impl.c
@@ -155,7 +155,6 @@ blake3_impl_setid(uint32_t id)
atomic_swap_32(&blake3_impl_chosen, IMPL_CYCLE);
break;
default:
- ASSERT3U(id, >=, 0);
ASSERT3U(id, <, blake3_supp_impls_cnt);
atomic_swap_32(&blake3_impl_chosen, id);
break;