From efe592cafad085389de9cf2cca7286b47df97236 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 17 Apr 2012 13:16:44 -0400 Subject: [PATCH] ck_bag: Operating on pointer to NULL is undefined behavior. Remove NULL check from ck_bag_remove_spmc. --- src/ck_bag.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ck_bag.c b/src/ck_bag.c index 9d1e65d..c530660 100644 --- a/src/ck_bag.c +++ b/src/ck_bag.c @@ -266,9 +266,6 @@ ck_bag_remove_spmc(struct ck_bag *bag, void *entry) struct ck_bag_block *cursor, *copy, *prev; uint16_t block_index, n_entries; - if (bag == NULL) - return -1; - cursor = bag->head; prev = NULL; while (cursor != NULL) {