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

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); int which_child = AVL_INDEX2CHILD(where);
size_t off = tree->avl_offset; size_t off = tree->avl_offset;
ASSERT(tree);
#ifdef _LP64 #ifdef _LP64
ASSERT(((uintptr_t)new_data & 0x7) == 0); ASSERT(((uintptr_t)new_data & 0x7) == 0);
#endif #endif
@ -680,8 +679,6 @@ avl_remove(avl_tree_t *tree, void *data)
int which_child; int which_child;
size_t off = tree->avl_offset; size_t off = tree->avl_offset;
ASSERT(tree);
delete = AVL_DATA2NODE(data, off); delete = AVL_DATA2NODE(data, off);
/* /*

View File

@ -274,8 +274,6 @@ taskq_lowest_id(taskq_t *tq)
taskq_ent_t *t; taskq_ent_t *t;
taskq_thread_t *tqt; taskq_thread_t *tqt;
ASSERT(tq);
if (!list_empty(&tq->tq_pend_list)) { if (!list_empty(&tq->tq_pend_list)) {
t = list_entry(tq->tq_pend_list.next, taskq_ent_t, tqent_list); t = list_entry(tq->tq_pend_list.next, taskq_ent_t, tqent_list);
lowest_id = MIN(lowest_id, t->tqent_id); lowest_id = MIN(lowest_id, t->tqent_id);