errno and h_errno values are not the same #876 by rfelker
authorMike Frysinger <vapier@gentoo.org>
Fri, 26 May 2006 01:56:42 +0000 (01:56 -0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 26 May 2006 01:56:42 +0000 (01:56 -0000)
libbb/inet_common.c

index ca0ef70524687c01d40a978e94cde79fdc57c3b9..c02c732f32273d3f07976b6608020378ea651dd9 100644 (file)
@@ -62,7 +62,6 @@ int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst)
        }
        if (hostfirst) {
                /* Don't try again */
-               errno = h_errno;
                return -1;
        }
 #ifdef DEBUG
@@ -74,7 +73,6 @@ int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst)
        bb_error_msg("gethostbyname (%s)", name);
 #endif
        if ((hp = gethostbyname(name)) == (struct hostent *) NULL) {
-               errno = h_errno;
                return -1;
        }
        memcpy((char *) &s_in->sin_addr, (char *) hp->h_addr_list[0],