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 51517A04AD; Mon, 24 Jan 2022 18:48:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FB3D42810; Mon, 24 Jan 2022 18:47:35 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id D7BCD427F5 for ; Mon, 24 Jan 2022 18:47:30 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id i1so6646559pla.0 for ; Mon, 24 Jan 2022 09:47:30 -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=220zs+hzdAwKr0UWsYGZ17rrW2th1M/OR9VP/D46Ms5itR29U2UGylVsQvHYvR9MUa yfJ3zG9CYsLh5jTuRaQrbZX6X0ZoiNYSExaOcO94BmmyzSPyQobcwpPo+pCLONFjbNgh EsljuRq8+ubA5PQ7hDoSFU1Y8Q/k6efrHT4FgrgOEPNB0BC7swt15NHVk2/HsnfsZZPW QEJo/NLOvuvKoW3HjU2TyINk2/N66ydBioRzYnixld6ua7Xo9LoR5/ZEiTIUZS7CsRRG oZLiqJkMeGjB4YI+ajw74c81pe37rnLFDZSbPGylcKFC7W4V4oFOgOQWNxynededsP2x m2oQ== 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=oZfR++oxd7S5iJqgP9QD5H1E03yJaN6AwFbcd5hnG0YN4FDBWnmUpavo1neWknvZIg Yqun8BC8VkleMBd54fmrg6a2wnXq3FRnVhqqULBdDgy/j8UlnNeX237lxW2yJNY8IKtt xlw2QsUtfAqCD4QNqQcak+gqfucb6orsPeTrol72oyXP9F48cmt6RuS4IfHkgFUh5gNe RFICVpqkMLBS+HwbmO7aY4p1LU2p5Jy1J3ePDLRWCexaqjCYLgTrSjuOACBip/uveBF5 s1A4zTH0jjsZt5tNQOLtVjpxiBC/TaL6GtzYJFqKlnX9KXlos5g/gTgjaKwT4d173E6g 2liA== X-Gm-Message-State: AOAM533VP27VbdSuSKEzIVnTclE/QKEljFYdmpgvM8SIB6Lvf4W+y26G HOU0FqiefJQGcyHA9FHKfFss8Dxh9tUMdQ== X-Google-Smtp-Source: ABdhPJySXhtnmtguj/JH78Eo3RfnOjVOjky1LaTE9kSO1M20LY2s3miNNqIczM09Iv6QWFEsvHpyiQ== X-Received: by 2002:a17:90a:9c2:: with SMTP id 60mr2918897pjo.17.1643046449908; Mon, 24 Jan 2022 09:47:29 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:29 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tomasz Kantecki Subject: [PATCH v2 08/83] examples/l2fwd-cat: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:04 -0800 Message-Id: <20220124174719.14417-9-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 --- 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