From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38A7142818; Thu, 23 Mar 2023 02:04:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B3E642BC9; Thu, 23 Mar 2023 02:04:37 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 5C2D641101 for ; Thu, 23 Mar 2023 02:04:34 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id p3-20020a17090a74c300b0023f69bc7a68so404911pjl.4 for ; Wed, 22 Mar 2023 18:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1679533473; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/NwdXVMctiQYTuvimYuEpKEUz0ffafp8hsvaZLBHtxw=; b=ehUKx/1wMvkwkgPR05d8KqYcyKfRawQY9lGnrs/7UEtD7Kipqn1i/MQ0CM54aPS9NR nqpy4QsqPlq0BRkx7I8JIbfatn/q8DtEcXAMHRFn+WLHqGDExd88ZJ+JBVwGw8Exy6N6 wZ7HHz+OE0Lykd5Z/4mYJerkOBaE4j6AxYztHFmHb/WtA8UI4bpW5I4aZ9LTfonFgVJr TWV1g5ZMzh7OMI7wk/duPwwlMARHLtKa7hAm7mp+b0xA47nlL+ALOuU5FTW/gvhvs7tB orwcJDK0n5+e4u/z9CtvLLrk/hkPTPJei86Z4beYZSG7/JC5i3JGrGn1PAjXTtmJk7V+ Zntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679533473; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/NwdXVMctiQYTuvimYuEpKEUz0ffafp8hsvaZLBHtxw=; b=Wg1t3Jw5pltqRWbWLzkwZneu0BvAa53tMuaJ/CbykBfstPzrDSaeHJOWbLB8BZO5hA ljYQX+RU4VTBQrKH0gHA7vcF5ZVVrNfVCj2qVMLTk8eLNvTi2xCewvvU8VS72WFB9Jul QSMfg2JMgNSM8/iXYyxCyE9gv0PPsNTpApCfmDFOQPrjPqvx5htW/aIsxiFVuqvBv0iq iK+1JYImSC2KklM83RsFuKZFpy/0IUb6xtU/Eb/+ylCjxdo64BGNqGjjH0vCGXv5g7FS IO1z1n8Putkl0tjLt91uxU+SVY2O/M7LA/5S2CPaXDIMAog6s2F5/J+79nzmICq//Od/ aU8w== X-Gm-Message-State: AO0yUKWPCb2qBIqPZwF/qLhJIEC/4RINfEbA57DJ+yk8M+ag5FGJxj/9 mkoZAjQB+ZpB/uwBnXmOLuos0YFHGedwHsV8ybp+YQ== X-Google-Smtp-Source: AK7set+LUafOpSLkh5rORM3PM7ZIzDCxA1GPV0/xZQEqtySRqBjfDzXlokTN20nVQR8xKbShn2p4xA== X-Received: by 2002:a17:90b:388e:b0:237:bf05:40b with SMTP id mu14-20020a17090b388e00b00237bf05040bmr6419374pjb.20.1679533473329; Wed, 22 Mar 2023 18:04:33 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id l9-20020a17090b078900b0023b4c0ef8f2sm135206pjz.20.2023.03.22.18.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 18:04:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram Subject: [PATCH 3/4] graph: remove unnicessary null checks Date: Wed, 22 Mar 2023 18:04:27 -0700 Message-Id: <20230323010428.64020-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230323010428.64020-1-stephen@networkplumber.org> References: <20230323010428.64020-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Checking for null before calling rte_mempool_free is unnecessary. Signed-off-by: Stephen Hemminger --- lib/graph/graph_pcap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/graph/graph_pcap.c b/lib/graph/graph_pcap.c index 9cbd1b8fdb6c..6c433300290b 100644 --- a/lib/graph/graph_pcap.c +++ b/lib/graph/graph_pcap.c @@ -40,8 +40,7 @@ void graph_pcap_exit(struct rte_graph *graph) { if (rte_eal_process_type() == RTE_PROC_PRIMARY) - if (pkt_mp) - rte_mempool_free(pkt_mp); + rte_mempool_free(pkt_mp); if (pcapng_fd) { rte_pcapng_close(pcapng_fd); -- 2.39.2