Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190.
[oweals/busybox.git] / rdate.c
diff --git a/rdate.c b/rdate.c
index ead1e7c7d1724aba7fff5693d474b166e5dc66d7..8deb35d147309c579004ec0c8a486f5aed2b8a36 100644 (file)
--- a/rdate.c
+++ b/rdate.c
@@ -45,8 +45,7 @@ static time_t askremotedate(const char *host)
        unsigned long int nett, localt;
        int fd;
 
-       if (!(h = gethostbyname(host)))         /* get the IP addr */
-               perror_msg_and_die("%s", host);
+       h = xgethostbyname(host);         /* get the IP addr */
 
        if ((tserv = getservbyname("time", "tcp")) == NULL)   /* find port # */
                perror_msg_and_die("%s", "time");