Skip to content

Commit 2258954

Browse files
Zhou jieliuw
authored andcommitted
tools: hv: kvp: remove unnecessary (void*) conversions
Remove unnecessary void* type casting. Signed-off-by: Zhou jie <zhoujie@nfschina.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20220823034552.8596-1-zhoujie@nfschina.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 676576d commit 2258954

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/hv/hv_kvp_daemon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
772772
const char *str;
773773

774774
if (family == AF_INET) {
775-
addr = (struct sockaddr_in *)addrp;
775+
addr = addrp;
776776
str = inet_ntop(family, &addr->sin_addr, tmp, 50);
777777
addr_length = INET_ADDRSTRLEN;
778778
} else {
779-
addr6 = (struct sockaddr_in6 *)addrp;
779+
addr6 = addrp;
780780
str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
781781
addr_length = INET6_ADDRSTRLEN;
782782
}

0 commit comments

Comments
 (0)