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 02A16A04AD; Mon, 24 Jan 2022 18:54:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABC16429E9; Mon, 24 Jan 2022 18:48:59 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 25AEA42939 for ; Mon, 24 Jan 2022 18:48:52 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id b15so1760695plg.3 for ; Mon, 24 Jan 2022 09:48:52 -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=renMYIsk25bwaPlvr2xmVjV9PhcOIVPwn32i+8xZ55Z1yl3vo/PZBxbPyj7gJoAANz wfkeWeQuxM1jIvspRoTMIiIDFU8NJ5krwdUtoAD+dRzMDwR7hugXBFEfj0IbsVGiP5JE x2T4YWapOzdjPEjogw/w33n48R2E7H+LDCFqV1JOo3FrpdLv+0Y333lpNwA+h4UsmWeT TBqEYB5QTPhnqVbvXZgZThw+P3oNxHTxH+Nlw6+K90Y8JlJvVN4nB1u9+pBStdgR0l3w otDGJ3Ngc8w1BMU0rPRykehul0eC2/T9ncHCB//Bqp2pFM482AumxvPyz/OUCdqPyzFN X5pw== 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=M75GPIFq7sGjjYYutVGix3WQZg5ogsm+XD9pXwhWsT3IFJAQ68qvTz66PZSz6dsS02 DfrDWebGcE8jO26rX8XcVX/KVoX0zbQHWGeIV60c21iieABUkjxhufvDi+Sf8GyRS35p tH9hDuL+p1MWluJ0fOr+8voA4ja5TMM+Dnixd8n72m5PSAWdr50A1CBbZ0Hpr6JMi40u 1xYZ2qdEocQnUYN5NM4n2evNtsNyCxLlXYxN9Qr9OnLV27tyvAC7F1wi4MBIwgWp9fXm nzjD013+zJ2lJR8W7c5Qc7OPv99rWDJ9gVFaJBPFHEwWLhLYe5XeUbLdCxlAnzUnjLmT Fidg== X-Gm-Message-State: AOAM532SRB902wBnnr6HNBUAlrbzlRrjeU+HXGa29hyXUqLgfWV+++FM dUX572bHDVe5gstrgSGU7QxjN84EfbW2lg== X-Google-Smtp-Source: ABdhPJxkN/+TrvtLMfXKdVD4Ttsui6t7eggzIgEumN2C3lzmBL7RSS2yHU08TpvH+66gU4PCyD3NXw== X-Received: by 2002:a17:902:f681:b0:14a:2a1e:4692 with SMTP id l1-20020a170902f68100b0014a2a1e4692mr15051096plg.99.1643046531225; Mon, 24 Jan 2022 09:48:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:50 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH v2 83/83] reorder: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:19 -0800 Message-Id: <20220124174719.14417-84-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/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