linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hv: Remove unnecessary (void*) conversions
@ 2022-10-08  8:32 Li zeming
  2022-10-26 15:23 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2022-10-08  8:32 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, wei.liu, decui
  Cc: linux-hyperv, linux-kernel, Li zeming

addrp is a void pointer and does not require a cast type.

Signed-off-by: Li zeming <zeming@nfschina.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hv: Remove unnecessary (void*) conversions
  2022-10-08  8:32 [PATCH] hv: Remove unnecessary (void*) conversions Li zeming
@ 2022-10-26 15:23 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2022-10-26 15:23 UTC (permalink / raw)
  To: Li zeming
  Cc: kys, haiyangz, sthemmin, wei.liu, decui, linux-hyperv, linux-kernel

On Sat, Oct 08, 2022 at 04:32:06PM +0800, Li zeming wrote:
> addrp is a void pointer and does not require a cast type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

This has already been changed. Thanks for the patch anyway.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-26 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-08  8:32 [PATCH] hv: Remove unnecessary (void*) conversions Li zeming
2022-10-26 15:23 ` Wei Liu

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).