summaryrefslogtreecommitdiff
path: root/wget.c
diff options
context:
space:
mode:
authorMatt Kraai2001-05-16 15:40:51 +0000
committerMatt Kraai2001-05-16 15:40:51 +0000
commitc55b8d41c15640fa1637f919b3f6eca6e781047a (patch)
tree03c1fca61c1b577b7c527d2b8482c5b7f6972bcd /wget.c
parent59df6f73988b103f0dcfffeaec10642527336c5e (diff)
downloadbusybox-c55b8d41c15640fa1637f919b3f6eca6e781047a.zip
busybox-c55b8d41c15640fa1637f919b3f6eca6e781047a.tar.gz
Add xgethostbyname and herror_msg* functions.
Diffstat (limited to 'wget.c')
-rw-r--r--wget.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wget.c b/wget.c
index 5fa918a..6fd170d 100644
--- a/wget.c
+++ b/wget.c
@@ -556,8 +556,7 @@ FILE *open_socket(char *host, int port)
memset(&s_in, 0, sizeof(s_in));
s_in.sin_family = AF_INET;
- if ((hp = (struct hostent *) gethostbyname(host)) == NULL)
- error_msg_and_die("cannot resolve %s", host);
+ hp = xgethostbyname(host);
memcpy(&s_in.sin_addr, hp->h_addr_list[0], hp->h_length);
s_in.sin_port = htons(port);
@@ -813,7 +812,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.40 2001/05/15 20:11:49 andersen Exp $
+ * $Id: wget.c,v 1.41 2001/05/16 15:40:48 kraai Exp $
*/