From ab722af65d70cc75196d3fdacdc417a371d2e58a Mon Sep 17 00:00:00 2001 From: Ankur Dwivedi Date: Fri, 17 Apr 2020 21:11:54 +0530 Subject: [PATCH] examples/ipsec-secgw: remove duplicated check The two if check does the same task, so removing one. Coverity issue: 355669 Fixes: 9ad50c29d01d ("examples/ipsec-secgw: add app mode worker") Signed-off-by: Ankur Dwivedi Acked-by: Anoob Joseph Acked-by: Akhil Goyal --- examples/ipsec-secgw/ipsec_worker.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c index 5fde66794e..b6c851f257 100644 --- a/examples/ipsec-secgw/ipsec_worker.c +++ b/examples/ipsec-secgw/ipsec_worker.c @@ -112,12 +112,7 @@ check_sp(struct sp_ctx *sp, const uint8_t *nlp, uint32_t *sa_idx) rte_acl_classify((struct rte_acl_ctx *)sp, &nlp, &res, 1, DEFAULT_MAX_CATEGORIES); - if (unlikely(res == 0)) { - /* No match */ - return 0; - } - - if (res == DISCARD) + if (unlikely(res == DISCARD)) return 0; else if (res == BYPASS) { *sa_idx = -1; -- 2.20.1