From: deraadt Date: Tue, 10 Dec 1996 15:15:39 +0000 (+0000) Subject: warnx, from netbsd X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=85936e6c09a3e973a6ce497c1c54a0081753a80d;p=openbsd warnx, from netbsd --- diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index bff4cccfa95..d2c329021ec 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -508,14 +508,12 @@ getinetaddr(host, inap) const char *host; struct in_addr *inap; { - extern char *__progname; /* Program name, from crt0. */ struct hostent *hp; if (inet_aton(host, inap) == 1) return (0); if ((hp = gethostbyname(host)) == NULL) { - (void)fprintf(stderr, "%s: %s: ", __progname, host); - herror(NULL); + warnx("%s: %s\n", host, hstrerror(h_errno)); return (-1); } (void)memcpy(inap, hp->h_addr, sizeof(*inap));