From: Ankur Dwivedi Date: Fri, 17 Apr 2020 15:41:54 +0000 (+0530) Subject: examples/ipsec-secgw: remove duplicated check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ab722af65d70cc75196d3fdacdc417a371d2e58a;p=dpdk.git 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 --- 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;