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>
This commit is contained in:
Родитель
676576d164
Коммит
2258954234
|
@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if (family == AF_INET) {
|
if (family == AF_INET) {
|
||||||
addr = (struct sockaddr_in *)addrp;
|
addr = addrp;
|
||||||
str = inet_ntop(family, &addr->sin_addr, tmp, 50);
|
str = inet_ntop(family, &addr->sin_addr, tmp, 50);
|
||||||
addr_length = INET_ADDRSTRLEN;
|
addr_length = INET_ADDRSTRLEN;
|
||||||
} else {
|
} else {
|
||||||
addr6 = (struct sockaddr_in6 *)addrp;
|
addr6 = addrp;
|
||||||
str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
|
str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
|
||||||
addr_length = INET6_ADDRSTRLEN;
|
addr_length = INET6_ADDRSTRLEN;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче