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 556EEA04A6; Mon, 24 Jan 2022 01:06:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C544C427F2; Mon, 24 Jan 2022 01:05:35 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id E9995427E0 for ; Mon, 24 Jan 2022 01:05:32 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id e28so9785136pfj.5 for ; Sun, 23 Jan 2022 16:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n1kdZY9bsWP4eeWLNwDfXRD5X13ceHgxBOZuNjBt+3c=; b=QZ29NIJ9f5Izf20iX8wqfIEwMeuGO9TaZrXEOvm3Ld/1SyUhQp1HLiiwI8MGPxj6L7 X/51oGw7F66zdB7wQ//0QXyNH621m8POjg0L7Eoh7ugJYOASKdkPv/qpceh3/SyoM8sJ FbCqsRzKFPumDmQnTojOf2TVcbFcaZWSjRIa1s2MlmT0xOrvqe+4DedtXRM9GG2FJfNf 5oASu7Pmd2ScHEt8FwxHe6OnVj+kNIqT9QFqLAP5su7LjuIZ+q7Yol68lIOjHKonS07i /HyMjuuW4wtO+qJGPIw3GARSZZN/aiTgJuAHhxfIlRO0XzllH1Qu38oSvMCjXq6PU7mC AlWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n1kdZY9bsWP4eeWLNwDfXRD5X13ceHgxBOZuNjBt+3c=; b=q7fCjGkYFy4RWSpjGtFbmT6CKtn2WhMBR8iwHZLAHOG971tFzX7T3U2bBiNkrt/H6l zjnrb77RMe2qxv4+uCIkSGSor5e8XR06Y9PqfyjChBN5MR5Bl7XpFDZ6BqMga4mT4LZD 7oC/X8a91uY4crsL11v80UM2r3N7RB46E/03MEiSQH4M2kIyIoHsJ84OlDdFbxAAGRx8 QeW+OXxVKGIuHELtUgQGVMiKubX6Ygy0anQQ0ZS4yAD1d8SaJIRWqM7Vtfy2vPCpHrTR 4zQ5rriX2b79rumMW3QNZYUUBtHjwLzHkv4WLGhNtN0YhDznW8ScEIxpW+ufR4ZFButQ kFUQ== X-Gm-Message-State: AOAM533FWwXS6zlGs3QTjLyKtavEEw02z2MX+SZTTp6flufU6lV4DO8Y Mp3IVjDt63frtutic9ARSsbZGtP8aMQxog== X-Google-Smtp-Source: ABdhPJw1qyYc2b4ys76muD6lQwZ8SSr3Joc5BxQfasT97ltup7zzqpuaXh1sJ8fVH2oHATBLAmyH1A== X-Received: by 2002:a05:6a00:8cc:b0:4a8:262:49e1 with SMTP id s12-20020a056a0008cc00b004a8026249e1mr11696547pfu.28.1642982731863; Sun, 23 Jan 2022 16:05:31 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id ck21sm10935350pjb.51.2022.01.23.16.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:31 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH 10/82] app/pdump: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:06 -0800 Message-Id: <20220124000518.319850-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124000518.319850-1-stephen@networkplumber.org> References: <20220124000518.319850-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 Remove redundant NULL pointer checks before free functions found by nullfree.cocci Signed-off-by: Stephen Hemminger --- app/pdump/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index 46f9d25db004..04a38e891119 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -502,14 +502,11 @@ cleanup_rings(void) for (i = 0; i < num_tuples; i++) { pt = &pdump_t[i]; - if (pt->device_id) - free(pt->device_id); + free(pt->device_id); /* free the rings */ - if (pt->rx_ring) - rte_ring_free(pt->rx_ring); - if (pt->tx_ring) - rte_ring_free(pt->tx_ring); + rte_ring_free(pt->rx_ring); + rte_ring_free(pt->tx_ring); } } -- 2.30.2