diff --git a/usr.sbin/accton/accton.c b/usr.sbin/accton/accton.c index 0d1704b9f5ee..af2fa8998406 100644 --- a/usr.sbin/accton/accton.c +++ b/usr.sbin/accton/accton.c @@ -32,23 +32,27 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint +#if 0 static char sccsid[] = "@(#)accton.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include -#include -#include -#include +#include #include +#include #include +#include -void usage __P((void)); +static void usage __P((void)); int main(argc, argv) @@ -68,18 +72,12 @@ main(argc, argv) switch(argc) { case 0: - if (acct(NULL)) { - (void)fprintf(stderr, - "accton: %s\n", strerror(errno)); - exit(1); - } + if (acct(NULL)) + err(1, NULL); break; case 1: - if (acct(*argv)) { - (void)fprintf(stderr, - "accton: %s: %s\n", *argv, strerror(errno)); - exit(1); - } + if (acct(*argv)) + err(1, "%s", *argv); break; default: usage(); @@ -87,7 +85,7 @@ main(argc, argv) exit(0); } -void +static void usage() { (void)fprintf(stderr, "usage: accton [file]\n");