cppcheck: remove redundant ASSERTs

The ASSERT that the passed pointer isn't NULL appears after the
pointer has already been dereferenced.  Remove the redundant check.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11508
This commit is contained in:
Brian Behlendorf
2021-01-22 21:24:08 -08:00
parent 6fc1ce0723
commit 2cdd75bed7
2 changed files with 0 additions and 5 deletions
-3
View File
@@ -492,7 +492,6 @@ avl_insert(avl_tree_t *tree, void *new_data, avl_index_t where)
int which_child = AVL_INDEX2CHILD(where);
size_t off = tree->avl_offset;
ASSERT(tree);
#ifdef _LP64
ASSERT(((uintptr_t)new_data & 0x7) == 0);
#endif
@@ -680,8 +679,6 @@ avl_remove(avl_tree_t *tree, void *data)
int which_child;
size_t off = tree->avl_offset;
ASSERT(tree);
delete = AVL_DATA2NODE(data, off);
/*