[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221008083206.4486-1-zeming@nfschina.com>
Date: Sat, 8 Oct 2022 16:32:06 +0800
From: Li zeming <zeming@...china.com>
To: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
wei.liu@...nel.org, decui@...rosoft.com
Cc: linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
Li zeming <zeming@...china.com>
Subject: [PATCH] hv: Remove unnecessary (void*) conversions
addrp is a void pointer and does not require a cast type.
Signed-off-by: Li zeming <zeming@...china.com>
---
tools/hv/hv_kvp_daemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 1e6fd6ca513b..445abb53bf0d 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
const char *str;
if (family == AF_INET) {
- addr = (struct sockaddr_in *)addrp;
+ addr = addrp;
str = inet_ntop(family, &addr->sin_addr, tmp, 50);
addr_length = INET_ADDRSTRLEN;
} else {
- addr6 = (struct sockaddr_in6 *)addrp;
+ addr6 = addrp;
str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
addr_length = INET6_ADDRSTRLEN;
}
--
2.18.2
Powered by blists - more mailing lists