From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, thomas@monjalon.net,
Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH 4/5] lib/librte_member: remove unnecessary void * pointer cast
Date: Mon, 15 Jan 2018 15:55:09 +0800 [thread overview]
Message-ID: <20180115075510.29348-5-zhiyong.yang@intel.com> (raw)
In-Reply-To: <20180115075510.29348-1-zhiyong.yang@intel.com>
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_member/rte_member.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index 0c4c14470..1366b3d39 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) {
--
2.13.3
next prev parent reply other threads:[~2018-01-15 8:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 7:55 [dpdk-dev] [PATCH 0/5] " Zhiyong Yang
2018-01-15 7:55 ` [dpdk-dev] [PATCH 1/5] lib/librte_lpm: " Zhiyong Yang
2018-01-15 7:55 ` [dpdk-dev] [PATCH 2/5] lib/librte_efd: remove unnecessary void * pointer cast using rte_zmalloc_socket Zhiyong Yang
2018-01-15 7:55 ` [dpdk-dev] [PATCH 3/5] lib/librte_hash: " Zhiyong Yang
2018-01-15 7:55 ` Zhiyong Yang [this message]
2018-01-15 7:55 ` [dpdk-dev] [PATCH 5/5] lib/librte_pipeline: " Zhiyong Yang
2018-01-15 14:29 ` [dpdk-dev] [PATCH 0/5] remove unnecessary void * pointer cast Ferruh Yigit
2018-01-16 0:55 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115075510.29348-5-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).