From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 06/11] pipeline: remove useless cast Date: Fri, 24 Jul 2015 10:06:19 -0700 Message-ID: <1437757584-15502-7-git-send-email-stephen@networkplumber.org> References: <1437757584-15502-1-git-send-email-stephen@networkplumber.org> To: dev@dpdk.org Return-path: Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id AFC6CC48E for ; Fri, 24 Jul 2015 19:06:25 +0200 (CEST) Received: by pdrg1 with SMTP id g1so16369337pdr.2 for ; Fri, 24 Jul 2015 10:06:25 -0700 (PDT) In-Reply-To: <1437757584-15502-1-git-send-email-stephen@networkplumber.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Found by modified version of acll_cast.cocci lib/librte_pipeline/rte_pipeline.c:358:18-49: WARNING: casting value returned by memory allocation function to (struct rte_pipeline_table_entry *) is useless. Signed-off-by: Stephen Hemminger --- lib/librte_pipeline/rte_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pipeline/rte_pipeline.c b/lib/librte_pipeline/rte_pipeline.c index bd700d2..d56cfa7 100644 --- a/lib/librte_pipeline/rte_pipeline.c +++ b/lib/librte_pipeline/rte_pipeline.c @@ -355,8 +355,8 @@ rte_pipeline_table_create(struct rte_pipeline *p, /* Allocate space for the default table entry */ entry_size = sizeof(struct rte_pipeline_table_entry) + params->action_data_size; - default_entry = (struct rte_pipeline_table_entry *) rte_zmalloc_socket( - "PIPELINE", entry_size, RTE_CACHE_LINE_SIZE, p->socket_id); + default_entry = rte_zmalloc_socket("PIPELINE", entry_size, + RTE_CACHE_LINE_SIZE, p->socket_id); if (default_entry == NULL) { RTE_LOG(ERR, PIPELINE, "%s: Failed to allocate default entry\n", __func__); -- 2.1.4