Compilation fix.
This commit is contained in:
parent
3112e6a863
commit
107448698f
1 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t host
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(flags & NI_NUMERICHOST) {
|
if(flags & NI_NUMERICHOST) {
|
||||||
len = snprintf((host, hostlen, "%s", inet_ntoa(sin->sin_addr));
|
len = snprintf(host, hostlen, "%s", inet_ntoa(sin->sin_addr));
|
||||||
if(len < 0 || len >= hostlen)
|
if(len < 0 || len >= hostlen)
|
||||||
return EAI_MEMORY;
|
return EAI_MEMORY;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -46,7 +46,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t host
|
||||||
if(!hp || !hp->h_name || !hp->h_name[0])
|
if(!hp || !hp->h_name || !hp->h_name[0])
|
||||||
return EAI_NODATA;
|
return EAI_NODATA;
|
||||||
|
|
||||||
len = snprintf((host, hostlen, "%s", hp->h_name);
|
len = snprintf(host, hostlen, "%s", hp->h_name);
|
||||||
if(len < 0 || len >= hostlen)
|
if(len < 0 || len >= hostlen)
|
||||||
return EAI_MEMORY;
|
return EAI_MEMORY;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue