summaryrefslogtreecommitdiff
path: root/lib/librte_member/rte_member.c
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2018-01-15 15:55:06 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-01-16 01:53:35 +0100
commit134975073af3a1b208e51e1fc588c53324ae2065 (patch)
treeea56790bb2bbc8e57dafe24368a78e59847dcde9 /lib/librte_member/rte_member.c
parentd33fbd51e58545666dc9980484fc7c6a1a0d5439 (diff)
downloaddpdk-134975073af3a1b208e51e1fc588c53324ae2065.zip
dpdk-134975073af3a1b208e51e1fc588c53324ae2065.tar.gz
dpdk-134975073af3a1b208e51e1fc588c53324ae2065.tar.xz
lib: remove unnecessary pointer cast
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> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'lib/librte_member/rte_member.c')
-rw-r--r--lib/librte_member/rte_member.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index 0c4c144..1366b3d 100644
--- a/lib/librte_member/rte_member.c
+++ b/lib/librte_member/rte_member.c
@@ -107,7 +107,7 @@ rte_member_create(const struct rte_member_parameters *params)
rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
TAILQ_FOREACH(te, member_list, next) {
- setsum = (struct rte_member_setsum *) te->data;
+ setsum = te->data;
if (strncmp(params->name, setsum->name,
RTE_MEMBER_NAMESIZE) == 0)
break;
@@ -125,7 +125,7 @@ rte_member_create(const struct rte_member_parameters *params)
}
/* Create a new setsum structure */
- setsum = (struct rte_member_setsum *) rte_zmalloc_socket(params->name,
+ setsum = rte_zmalloc_socket(params->name,
sizeof(struct rte_member_setsum), RTE_CACHE_LINE_SIZE,
params->socket_id);
if (setsum == NULL) {