summaryrefslogtreecommitdiff
path: root/usr.bin/finger/net.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-07-10 15:45:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-07-10 15:45:20 +0000
commit40e9d89d04d73ca717a5779ac980382050fcac96 (patch)
tree9f4dfca9c29cb1cc897c985751db71ae1615c9b2 /usr.bin/finger/net.c
parent88d931f35a731adb533dcf367837ff5949637d86 (diff)
err/warn
Diffstat (limited to 'usr.bin/finger/net.c')
-rw-r--r--usr.bin/finger/net.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c
index ea01e774ca8..a39548ae752 100644
--- a/usr.bin/finger/net.c
+++ b/usr.bin/finger/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.5 1997/05/30 23:35:52 kstailey Exp $ */
+/* $OpenBSD: net.c,v 1.6 1998/07/10 15:45:16 mickey Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)net.c 5.5 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$OpenBSD: net.c,v 1.5 1997/05/30 23:35:52 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: net.c,v 1.6 1998/07/10 15:45:16 mickey Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -50,6 +50,7 @@ static char rcsid[] = "$OpenBSD: net.c,v 1.5 1997/05/30 23:35:52 kstailey Exp $"
#include <string.h>
#include <ctype.h>
#include <unistd.h>
+#include <err.h>
#include "finger.h"
#include "extern.h"
@@ -72,8 +73,7 @@ netfinger(name)
if (inet_aton(host, &sin.sin_addr) == 0) {
hp = gethostbyname(host);
if (hp == 0) {
- (void)fprintf(stderr,
- "finger: unknown host: %s\n", host);
+ warnx("unknown host: %s", host);
return;
}
sin.sin_family = hp->h_addrtype;
@@ -82,7 +82,7 @@ netfinger(name)
} else
sin.sin_family = AF_INET;
if (!(sp = getservbyname("finger", "tcp"))) {
- (void)fprintf(stderr, "finger: tcp/finger: unknown service\n");
+ warnx("tcp/finger: unknown service\n");
return;
}
sin.sin_port = sp->s_port;