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 21ECEA04AD; Mon, 24 Jan 2022 18:54:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABB1B429CD; Mon, 24 Jan 2022 18:48:55 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 51EE7429AE for ; Mon, 24 Jan 2022 18:48:48 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id s61-20020a17090a69c300b001b4d0427ea2so21162109pjj.4 for ; Mon, 24 Jan 2022 09:48:48 -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=SNwpG3frGNXXYttKmqH6tfoJ/7BWDNsqwVHnDJXpTaM=; b=hGR57Jld5T448uz7SQnriJh4YMypc7VZAx2h5lqx31YPEBKhO4UwIF7TLzbn3oHs4/ /NsUmjZQtSbwZT2FKbz1IUhNwD1PUS5+njsdUYN1cYszzrqA1Q3LOPjZLreHCUOVf8cb KYZcM+irOY6KCNWCf3mhO8r9ouJQ91SRU4vrn2CcOlIv1ReuBp5ljI4bREzK3eMUZGct VPXLWBmNeH+hSJ4CgLdMhHqWgmyq4BIG/XXPlGZ4aEdVI/VGm6WelaCc3gSh1nRW3TsR g7iSFEdRkTkZEuG/JMJb2YEPK+bb1nN28Uj+qD7Jh7AgDyvY6AjCz5qPT8WEXBMZmPL4 zW9A== 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=SNwpG3frGNXXYttKmqH6tfoJ/7BWDNsqwVHnDJXpTaM=; b=nbVJ/nqtPTznnwpGOOCGjrT+Iv+hxME6p35nVSH7Bo3EsqOVoumeJhErFvWWzcl3ls VI2seNL5jBqVkkH8ltmYWA9XgIwmAlg6zBwOswb1XHKDwMOB9bOLrtwjvjZ35DNKt+Rj zZLrd8GzKhhMWs30u6Gz4+nJg82bJfeNvwi+0KB7e7A46h3PPSPPrCMTkLIqhL4cpXdi AKnIubH0LpzyIuY6+sxvVuWu8uNJHa2AVkoBtarBwEKaB1xuqELIGlKg0ZUQJEVEehTB DexFzVQ3SeDyj23J1W1WhiHuCKx7II1tBTGDLsYToZHSfpLObnVfOmhR3/hVoLKKvbHM T6Jw== X-Gm-Message-State: AOAM532hN8QluLeMd3A51cUqskMVzPl4zL8h3M1+A9/2pMXbKT+32Is+ o2Kvpg7DCjajCRuEPx9o86t1PNj0kFN2MQ== X-Google-Smtp-Source: ABdhPJxPb0KNOzt5ayPQn2hhhwEvkeY1FdjDP8zDG7zjAzUHtHXVrDc/CKebHt3aBpoSonPXMBCh1A== X-Received: by 2002:a17:90a:5d13:: with SMTP id s19mr2946827pji.117.1643046527390; Mon, 24 Jan 2022 09:48:47 -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.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:47 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram Subject: [PATCH v2 79/83] graph: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:15 -0800 Message-Id: <20220124174719.14417-80-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 --- lib/graph/graph_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c index aa70929dc32e..65e12d46a313 100644 --- a/lib/graph/graph_stats.c +++ b/lib/graph/graph_stats.c @@ -233,8 +233,7 @@ cluster_add(struct cluster *cluster, struct graph *graph) static void cluster_fini(struct cluster *cluster) { - if (cluster->graphs) - free(cluster->graphs); + free(cluster->graphs); } static int -- 2.30.2