diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-10 22:20:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-06-10 22:20:55 +0000 |
commit | b8aaa8bec8414f8e55cf9b61fe0873d242c773b8 (patch) | |
tree | 5e43016c4fae834239fd38972fd58355ed6b54b5 /usr.bin/who | |
parent | f18f6607440f6d2da08fac3522d88a65c77a5f3e (diff) |
mostly ansi cleanup; pval ok
Diffstat (limited to 'usr.bin/who')
-rw-r--r-- | usr.bin/who/who.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/usr.bin/who/who.c b/usr.bin/who/who.c index 24979c106ab..32cce5c7470 100644 --- a/usr.bin/who/who.c +++ b/usr.bin/who/who.c @@ -1,4 +1,4 @@ -/* $OpenBSD: who.c,v 1.15 2003/06/03 02:56:23 millert Exp $ */ +/* $OpenBSD: who.c,v 1.16 2003/06/10 22:20:54 deraadt Exp $ */ /* $NetBSD: who.c,v 1.4 1994/12/07 04:28:49 jtc Exp $ */ /* @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: who.c,v 1.15 2003/06/03 02:56:23 millert Exp $"; +static char rcsid[] = "$OpenBSD: who.c,v 1.16 2003/06/10 22:20:54 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -75,9 +75,7 @@ int show_quick; /* quick, names only */ #define HOST_WIDTH 32 int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { struct utmp usr; FILE *ufp; @@ -183,8 +181,7 @@ main(argc, argv) } void -who_am_i(ufp) - FILE *ufp; +who_am_i(FILE *ufp) { struct utmp usr; struct passwd *pw; @@ -214,8 +211,7 @@ who_am_i(ufp) } void -output(up) - struct utmp *up; +output(struct utmp *up) { struct stat sb; char line[sizeof(_PATH_DEV) + sizeof (up->ut_line)]; @@ -267,7 +263,7 @@ output(up) } void -output_labels() +output_labels(void) { (void)printf("%-*.*s ", NAME_WIDTH, UT_NAMESIZE, "USER"); @@ -286,8 +282,7 @@ output_labels() } FILE * -file(name) - char *name; +file(char *name) { FILE *ufp; @@ -299,7 +294,7 @@ file(name) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: who [-mqTuH] [ file ]\n who am i\n"); exit(1); |