[dpdk-dev] [PATCH 3/5] lib/librte_hash: remove unnecessary void * pointer cast using rte_zmalloc_socket
Zhiyong Yang
zhiyong.yang at intel.com
Mon Jan 15 08:55:08 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_hash/rte_fbk_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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");
--
2.13.3
More information about the dev
mailing list