DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] examples/ipsec-secgw: remove duplicated if check
@ 2020-04-17 15:41 Ankur Dwivedi
  2020-04-17 15:41 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: check return value of function Ankur Dwivedi
  2020-04-17 16:03 ` [dpdk-dev] [PATCH 1/2] examples/ipsec-secgw: remove duplicated if check Anoob Joseph
  0 siblings, 2 replies; 5+ messages in thread
From: Ankur Dwivedi @ 2020-04-17 15:41 UTC (permalink / raw)
  To: dev; +Cc: lbartosik, anoobj, Ankur Dwivedi

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 <adwivedi@marvell.com>
---
 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 5fde667..b6c851f 100644
--- a/examples/ipsec-secgw/ipsec_worker.c
+++ b/examples/ipsec-secgw/ipsec_worker.c
@@ -112,12 +112,7 @@
 	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;
-- 
1.9.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-17 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 15:41 [dpdk-dev] [PATCH 1/2] examples/ipsec-secgw: remove duplicated if check Ankur Dwivedi
2020-04-17 15:41 ` [dpdk-dev] [PATCH 2/2] examples/ipsec-secgw: check return value of function Ankur Dwivedi
2020-04-17 16:05   ` Anoob Joseph
2020-04-17 16:03 ` [dpdk-dev] [PATCH 1/2] examples/ipsec-secgw: remove duplicated if check Anoob Joseph
2020-04-17 21:16   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).