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 4AD6BA04A6; Mon, 24 Jan 2022 01:06:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D622427DC; Mon, 24 Jan 2022 01:05:32 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id AC207427BC for ; Mon, 24 Jan 2022 01:05:29 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id b1-20020a17090a990100b001b14bd47532so14858989pjp.0 for ; Sun, 23 Jan 2022 16:05:29 -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=FX1lbRFpgXCJQC7p1TcjAoI5WAe9NNrSSKSl+pJehBw=; b=oXqxcPU6EAoBODnn9JR4Fv8NewGhIFiEry8teyr/W5jNzfSlrMnCGXpQlg8TzHUrdt NGiSfFPwg5/HynOuDUCgvykE8ITAVVIBwyCdsUNJljD3wpCBZm+YGqPpbBdG24EbySNp AQMwsX7xDyOOhW0JttrlZUQuawk1g3JqesVV0YWYfXpwB+9lqgNzG4Tpy0ugSRCHkuaD p3/mWZmJLV2oiUBD/3NLZwTj2hOv2m3hkLmnRhjhrJR/FqWGc0HPgIgBKHbxDTfp9f1r 6gI+e7efUrJPzqlwISDG+kGV7W8qmA8iBJQjY9YJ+pzmaw6mbE+Tx/KKwmfFlwkfrUdF s3Xw== 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=FX1lbRFpgXCJQC7p1TcjAoI5WAe9NNrSSKSl+pJehBw=; b=2Bxens+lsm81v1zxRhE+s8+rlTc9AYap3s3PTzpF1q6n06qWmL1pv2fOwvt3A9rMAa I5ty3RWXtpxRCcm7w7gplTIZRDY46l0ZcWxEaKa9vfj4h6CxwcZVBOSWAcItU/oWJmDt KAMt+QLPhAk/DovrzIPukUMQzRUzq9x2BE60n1En+m2debGCanR5kuESwIAc5EEKibdg 1QuKKe9Qb9X5rp/HeYFnnnEAykr8TzB3RIuQljoPIwjMd6CmxTHdPs3vKqd7E1HoceHd vveXJIn7V/MkmOIS0wlACDFlPd7M/EAfPAl8bXfc+Ht9ptc68WZXh7yqLqGX5M5gQQEJ j/SQ== X-Gm-Message-State: AOAM531cPd5oGWtx18TZ+YFuAXhuWCQ9k4Th/Hh1QUo9RH89i68/Rubp bQjGsmb32xMtJDHTJ4/alYxYCHPxmHhjvg== X-Google-Smtp-Source: ABdhPJzX5xTKox4Pg2bhyYRTLmlLvFAhwmKhGgHJe0PGKtCdlHp+dbHFO24CDO+gsa08eG9bb14cvg== X-Received: by 2002:a17:90a:470a:: with SMTP id h10mr10650064pjg.25.1642982728670; Sun, 23 Jan 2022 16:05:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:28 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tomasz Kantecki Subject: [PATCH 07/82] examples/l2fwd-cat: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:03 -0800 Message-Id: <20220124000518.319850-8-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 --- examples/l2fwd-cat/cat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/l2fwd-cat/cat.c b/examples/l2fwd-cat/cat.c index 502c6b32780e..77154c8b7e61 100644 --- a/examples/l2fwd-cat/cat.c +++ b/examples/l2fwd-cat/cat.c @@ -872,8 +872,7 @@ cat_fini(void) #if PQOS_VERSION <= 103 memset(m_sockets, 0, sizeof(m_sockets)); #else - if (m_sockets != NULL) - free(m_sockets); + free(m_sockets); #endif m_sock_count = 0; memset(m_config, 0, sizeof(m_config)); -- 2.30.2