From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 520C5A058A; Fri, 17 Apr 2020 17:42:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3E5EF1E961; Fri, 17 Apr 2020 17:42:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 8406E1E91B for ; Fri, 17 Apr 2020 17:42:28 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03HFaFvh018167 for ; Fri, 17 Apr 2020 08:42:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=DvPPAFbu9BJlIAg0iMZaiFmPBR4YBSHU/HXTsX4dH+s=; b=r0h+cwHdLWOwgW/OfOewLArll7zUN5ZKjpNlbAofPdlRZVbEf5EXHmMVQhCVwsIy8nOh uEGk3GlxC0H2FHVaqBiIGxcAoQHp4878XiL9gM+c4+SLOsjCknxM12CmaxLR2vfCIdig IhFkJrKJoOeXaP6GYYxZIVoymheN7nEDqiu+0j0S2c8rDdYzsml9p0wPlN1ua/GJuVtM tSUGzkE9xfDIWfp2q8fYlHBrQrhKMq9YY/jwoOUuJlla4WKvotNzh8Q2ns1gJvcof5Rl yCXOu9yoympK8m/nm7WKFcfTqbrAjZchhn4/p1vpkTC0T6Jvje0Occet/tcA1YBCC1Nh Zw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 30dn84vs17-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 17 Apr 2020 08:42:27 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 17 Apr 2020 08:42:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 17 Apr 2020 08:42:26 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 66EC73F703F; Fri, 17 Apr 2020 08:42:22 -0700 (PDT) From: Ankur Dwivedi To: CC: , , Ankur Dwivedi Date: Fri, 17 Apr 2020 21:11:54 +0530 Message-ID: <1587138115-13149-1-git-send-email-adwivedi@marvell.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-17_07:2020-04-17, 2020-04-17 signatures=0 Subject: [dpdk-dev] [PATCH 1/2] examples/ipsec-secgw: remove duplicated if check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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