summaryrefslogtreecommitdiffstats
path: root/usr.bin/w/w.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-25 06:42:19 +0000
committercharnier <charnier@FreeBSD.org>1997-08-25 06:42:19 +0000
commit0beb621f633448bb0c020493b520e4288254b994 (patch)
tree07adca9dae414e51bf120e30cefd4d2975e9753f /usr.bin/w/w.c
parent5aeacfdd3737ecd7f236d668dba2a725e8af8dfd (diff)
downloadFreeBSD-src-0beb621f633448bb0c020493b520e4288254b994.zip
FreeBSD-src-0beb621f633448bb0c020493b520e4288254b994.tar.gz
Typo in usage(). Err -> errx when testing allocations.
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r--usr.bin/w/w.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 251cde0..1f16154 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -32,13 +32,17 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -204,7 +208,7 @@ main(argc, argv)
strncmp(utmp.ut_name, sel_user, UT_NAMESIZE) != 0))
continue;
if ((ep = calloc(1, sizeof(struct entry))) == NULL)
- err(1, NULL);
+ errx(1, "calloc");
*nextp = ep;
nextp = &(ep->next);
memmove(&(ep->utmp), &utmp, sizeof(struct utmp));
@@ -306,7 +310,7 @@ main(argc, argv)
}
if ((vis_args = malloc(argwidth * 4 + 1)) == NULL)
- err(1, NULL);
+ errx(1, "malloc");
for (ep = ehead; ep != NULL; ep = ep->next) {
p = *ep->utmp.ut_host ? ep->utmp.ut_host : "-";
if ((x = strchr(p, ':')) != NULL)
@@ -451,8 +455,9 @@ usage(wcmd)
{
if (wcmd)
(void)fprintf(stderr,
- "usage: w: [-hin] [-M core] [-N system] [user]\n");
+ "usage: w [-hin] [-M core] [-N system] [user]\n");
else
- (void)fprintf(stderr, "uptime\n");
+ (void)fprintf(stderr,
+ "usage: uptime\n");
exit (1);
}
OpenPOWER on IntegriCloud