[PATCH 06/82] examples/pipeline/thread: remove unnecessary NULL checks
Stephen Hemminger
stephen at networkplumber.org
Mon Jan 24 01:04:02 CET 2022
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
examples/pipeline/thread.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/examples/pipeline/thread.c b/examples/pipeline/thread.c
index bf11e6144b75..5fe7eae00eb6 100644
--- a/examples/pipeline/thread.c
+++ b/examples/pipeline/thread.c
@@ -89,11 +89,9 @@ thread_free(void)
continue;
/* MSGQs */
- if (t->msgq_req)
- rte_ring_free(t->msgq_req);
+ rte_ring_free(t->msgq_req);
- if (t->msgq_rsp)
- rte_ring_free(t->msgq_rsp);
+ rte_ring_free(t->msgq_rsp);
}
}
--
2.30.2
More information about the dev
mailing list