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 6B480A04AD; Mon, 24 Jan 2022 18:48:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D290342820; Mon, 24 Jan 2022 18:47:37 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 46B4242808 for ; Mon, 24 Jan 2022 18:47:34 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id d12-20020a17090a628c00b001b4f47e2f51so18374745pjj.3 for ; Mon, 24 Jan 2022 09:47:34 -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=tL/Bwz8/rsDUI2myPNMp45NjBn92k0mAVJTd6Z1XXSpqN7ftaaYoUYaqTulvueZ5Us 4bVbL5jToiLFOJtgdY7NVPtT1sLRppLVexZxr4Mkn28LNInkehQ4AP5dAw3YHjDL7Bwh XZkPqugpGHDr6I+qtqbMrRVi4Fr9yWztRP2S4r3fUEhRz6kikryqLWC6IVf1gxN8XQTF l0VLDG6kn6lzjT7Cmkazqn4eg0cl/vAMqalF212l4D2oujM91HAfyzcPoolOStSOCzIS YfDaNt3NVyg6GUjfFIBRa7qtegUJit/JrrGHjXnuC8FIgCZmrNFpZfipU46XjhwKsOQ2 xupw== 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=yUInCKHfwII6YQck0/3SgU6QW4nFl5Ub79XM3mNB5W6L2vWalYha4q4jM6WA/VJ2ki bMtSdPUDCzE9+7QqvW0QQwjjtuxE0tCVQHZdrkXKNhoHwulYkp9yF7v8LM8bnXjwNMNP tG33WYPGb/yOZAQvf2b3sGP7ezm3+G6ZkGSjf6cfuPeRGmGllfjv4SbVXsGvS4xz6jaw k9xOtoOcfIiffLdiNi8D79g3kKKJJ+zfc44yf8yYc31Yvac3sqoeEeQCtFRuJ33d5NWO nfONWu0GMeIWZrAZiPooiH8UZpS7/C7c6i5vO/HFr+CD5mgS9DSKLWpXow4/g78M4aph YFRg== X-Gm-Message-State: AOAM532o6asiH7Ek604Ci4qVisdLFQ8ycmTConOZMb3NOhUQNj1gHu5j RqETlwso/2kDgYFTFCujb4r3hJtn0Sugaw== X-Google-Smtp-Source: ABdhPJzXtvm1xvba9NOOrOjM25gSGPiGN+T6kJi5kgcYc6m4nYAAcgFQPEnaUYhi8XQa5J3NhanUag== X-Received: by 2002:a17:902:b083:b0:14a:f06c:aa6b with SMTP id p3-20020a170902b08300b0014af06caa6bmr15222022plr.147.1643046453254; Mon, 24 Jan 2022 09:47:33 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:32 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v2 11/83] app/pdump: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:07 -0800 Message-Id: <20220124174719.14417-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-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