From 0c9de56573a9a1b98dbea1d411be578d800586f9 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 10 Dec 1996 15:15:40 +0000 Subject: warnx, from netbsd --- usr.sbin/arp/arp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)); -- cgit v1.2.3