diff mbox series

[82/82] reorder: remove unnecessary NULL checks

Message ID 20220124000518.319850-83-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series remove unnecessary null checks | expand


Context Check Description
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Jan. 24, 2022, 12:05 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 lib/reorder/rte_reorder.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series


diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c
index 9445853b79cc..bc0241bfb3fd 100644
--- a/lib/reorder/rte_reorder.c
+++ b/lib/reorder/rte_reorder.c
@@ -192,10 +192,8 @@  rte_reorder_free_mbufs(struct rte_reorder_buffer *b)
 	/* Free up the mbufs of order buffer & ready buffer */
 	for (i = 0; i < b->order_buf.size; i++) {
-		if (b->order_buf.entries[i])
-			rte_pktmbuf_free(b->order_buf.entries[i]);
-		if (b->ready_buf.entries[i])
-			rte_pktmbuf_free(b->ready_buf.entries[i]);
+		rte_pktmbuf_free(b->order_buf.entries[i]);
+		rte_pktmbuf_free(b->ready_buf.entries[i]);