diff options
Diffstat (limited to 'main/network.c')
-rw-r--r-- | main/network.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/network.c b/main/network.c index 5566f4e713..2297678156 100644 --- a/main/network.c +++ b/main/network.c @@ -1265,11 +1265,11 @@ struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char * int herr,res; if (*hstbuflen == 0) { - *hstbuflen = 1024; + *hstbuflen = 1024; *tmphstbuf = (char *)malloc (*hstbuflen); } - while (( res = + while (( res = gethostbyname_r(host,hostbuf,*tmphstbuf,*hstbuflen,&hp,&herr)) && (errno == ERANGE)) { /* Enlarge the buffer. */ @@ -1280,7 +1280,7 @@ struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char * if (res != SUCCESS) { return NULL; } - + return hp; } #endif @@ -1295,7 +1295,7 @@ struct hostent * gethostname_re (const char *host,struct hostent *hostbuf,char * *tmphstbuf = (char *)malloc (*hstbuflen); } - while ((NULL == ( hp = + while ((NULL == ( hp = gethostbyname_r(host,hostbuf,*tmphstbuf,*hstbuflen,&herr))) && (errno == ERANGE)) { /* Enlarge the buffer. */ |