From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 756251B022 for ; Mon, 15 Jan 2018 09:08:23 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2018 00:08:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,362,1511856000"; d="scan'208";a="195405195" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by fmsmga005.fm.intel.com with ESMTP; 15 Jan 2018 00:08:22 -0800 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, Zhiyong Yang Date: Mon, 15 Jan 2018 15:55:09 +0800 Message-Id: <20180115075510.29348-5-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180115075510.29348-1-zhiyong.yang@intel.com> References: <20180115075510.29348-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 4/5] lib/librte_member: remove unnecessary void * pointer cast X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2018 08:08:24 -0000 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 --- 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