Code cleanup

This commit is contained in:
Pierre Pronchery 2018-08-12 16:38:00 +02:00
parent 70df56f73c
commit c1d3656f0b

View File

@ -1047,7 +1047,7 @@ ip_resolve(const char *dns_str, char *ip_str, int family)
struct sockaddr_in *in; struct sockaddr_in *in;
char *win_ip; char *win_ip;
#else #else
struct sockaddr_in *sai_remote; /* Remote host information as a sockaddr_in structure */ char *sai_remote; /* Remote host information */
#endif #endif
#if WIN32 #if WIN32
@ -1090,7 +1090,7 @@ ip_resolve(const char *dns_str, char *ip_str, int family)
if (win_ip != NULL && (strlcpy(ip_str, win_ip, ip_bufsize) > 0)) if (win_ip != NULL && (strlcpy(ip_str, win_ip, ip_bufsize) > 0))
#else #else
sai_remote = (struct sockaddr_in *)get_in_addr((struct sockaddr *)(rp->ai_addr)); sai_remote = get_in_addr((struct sockaddr *)(rp->ai_addr));
if (inet_ntop(rp->ai_family, sai_remote, ip_str, ip_bufsize) != NULL) if (inet_ntop(rp->ai_family, sai_remote, ip_str, ip_bufsize) != NULL)
#endif #endif
{ {