[dpdk-dev,3/5] lib/librte_hash: remove unnecessary void * pointer cast using rte_zmalloc_socket

Message ID 20180115075510.29348-4-zhiyong.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Yang, Zhiyong Jan. 15, 2018, 7:55 a.m. UTC
  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@intel.com>
---
 lib/librte_hash/rte_fbk_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_hash/rte_fbk_hash.c b/lib/librte_hash/rte_fbk_hash.c
index a8d0d485d..4aff40e67 100644
--- a/lib/librte_hash/rte_fbk_hash.c
+++ b/lib/librte_hash/rte_fbk_hash.c
@@ -123,7 +123,7 @@  rte_fbk_hash_create(const struct rte_fbk_hash_params *params)
 	}
 
 	/* Allocate memory for table. */
-	ht = (struct rte_fbk_hash_table *)rte_zmalloc_socket(hash_name, mem_size,
+	ht = rte_zmalloc_socket(hash_name, mem_size,
 			0, params->socket_id);
 	if (ht == NULL) {
 		RTE_LOG(ERR, HASH, "Failed to allocate fbk hash table\n");