mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
@@ -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);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user