[dpdk-dev] [PATCH 5/5] lib/librte_pipeline: remove unnecessary void * pointer cast using rte_zmalloc_socket

Zhiyong Yang zhiyong.yang at intel.com
Mon Jan 15 08:55:10 CET 2018


void * pointer can be assigned to any data type pointer. Unnecessary cast
can be removed in order to keep code clearer.

Signed-off-by: Zhiyong Yang <zhiyong.yang at intel.com>
---
 lib/librte_pipeline/rte_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pipeline/rte_pipeline.c b/lib/librte_pipeline/rte_pipeline.c
index 1b331f4df..0cb8b804e 100644
--- a/lib/librte_pipeline/rte_pipeline.c
+++ b/lib/librte_pipeline/rte_pipeline.c
@@ -347,7 +347,7 @@ 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(
+	default_entry = rte_zmalloc_socket(
 		"PIPELINE", entry_size, RTE_CACHE_LINE_SIZE, p->socket_id);
 	if (default_entry == NULL) {
 		RTE_LOG(ERR, PIPELINE,
-- 
2.13.3



More information about the dev mailing list