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 81A9FA04A6; Mon, 24 Jan 2022 01:12:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD2EB42973; Mon, 24 Jan 2022 01:06:51 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 09F0E42960 for ; Mon, 24 Jan 2022 01:06:48 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id i8so13594976pgt.13 for ; Sun, 23 Jan 2022 16:06:47 -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=4JbSYjjocmCv0cQNMjUL6E2+zoHDau5GvbwOfL56L7k=; b=qy0to2JhQwg7cxSTJgFmq3MXBLeIcjMtoc9V+ispCWS3AQNJLeIMtjshzXbnc7ZIQo KvpWJWAKHXeumTjk8kjU1tbUkp5hHkjV8f/CKi6FDejp4EPwAi3mkRmeJCRVgowrE0Z8 qcCoff3M8X+gUY00ObDBxoTQL+gGY8eA0BX/iOIEtO0YnVlQkIO9SFYmWsKhD+oKZUoJ ehrsARv6oOouhIlviAcVHN1lkyXh4XbkhRuS2kl+9eM65lfS8EffdnBGGua5tXomK1JO O3btCWvkETzmFSzCYIs6tfrVd6EdS6EcTaZCGjPGHWsQB48bnIzFGRdQ74RqNFoBxmz+ 6l0w== 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=4JbSYjjocmCv0cQNMjUL6E2+zoHDau5GvbwOfL56L7k=; b=GnSpB8b0NF39j9dGw6V+zPkVUNWeyx8zxzOClVm17iULPc6wlQD3TOkmFzlau2nhqF nScZrOaYp9o2VyVIpHpiyJ5KbXC4wll/sgrDsVYPJum0JT0gvE7XG8k/R3orsZpQB4t9 quhZPzQE3GB7IglIW7RMvNXSFWS+qXxMk28WfBeGdMubCCq3CnzMByYH7el3KguhAU2q vupotSlsVKRi99Iz/wsdMPT9JdXS2ZtxmMO4XN7jizpy1ad6eyoWeqXlLx9g8zSQvO2L RIZeGozvPG74h3y1j0hp/S2HA2YOQFVN4zug5gLTDtRTav3CCe21TjUZzOkq1Yxi4tUb dVWA== X-Gm-Message-State: AOAM533r6eC5dikgaF8RgRvFvPLPplFzGtU9hHE8CjooEHaxkW9yNt/y Y38M3pt2HnkBsMI2JKL2GIM5Hr4iSY0JWw== X-Google-Smtp-Source: ABdhPJxjVwnnNPpFVzw/AZXAMEkhwxZxLi7zjZZ5qRNHCs8xb0748h/HgXQ2sf/UrQVhcQJFR2o/8Q== X-Received: by 2002:a63:3d0e:: with SMTP id k14mr9862099pga.484.1642982807036; Sun, 23 Jan 2022 16:06:47 -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.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:46 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH 82/82] reorder: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:18 -0800 Message-Id: <20220124000518.319850-83-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 --- lib/reorder/rte_reorder.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/reorder/rte_reorder.c b/lib/reorder/rte_reorder.c index 9445853b79cc..bc0241bfb3fd 100644 --- a/lib/reorder/rte_reorder.c +++ b/lib/reorder/rte_reorder.c @@ -192,10 +192,8 @@ rte_reorder_free_mbufs(struct rte_reorder_buffer *b) /* Free up the mbufs of order buffer & ready buffer */ for (i = 0; i < b->order_buf.size; i++) { - if (b->order_buf.entries[i]) - rte_pktmbuf_free(b->order_buf.entries[i]); - if (b->ready_buf.entries[i]) - rte_pktmbuf_free(b->ready_buf.entries[i]); + rte_pktmbuf_free(b->order_buf.entries[i]); + rte_pktmbuf_free(b->ready_buf.entries[i]); } } -- 2.30.2