summaryrefslogtreecommitdiffstats
path: root/usr.bin/who/who.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-12-11 22:29:53 +0000
committermarkm <markm@FreeBSD.org>2001-12-11 22:29:53 +0000
commitff1e6296f0a515acca2fe0ba3cdcb27f991f4abc (patch)
tree5fbd1c0196d8c6e3e29e44f9fd5f980ba916a98c /usr.bin/who/who.c
parent1f1707d89210fde12a851f855259c8a08d955764 (diff)
downloadFreeBSD-src-ff1e6296f0a515acca2fe0ba3cdcb27f991f4abc.zip
FreeBSD-src-ff1e6296f0a515acca2fe0ba3cdcb27f991f4abc.tar.gz
WARNS=2 fix, use __FBSDID().
WARNS=2 is not in Makefile, as this will be the default.
Diffstat (limited to 'usr.bin/who/who.c')
-rw-r--r--usr.bin/who/who.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/usr.bin/who/who.c b/usr.bin/who/who.c
index a646d58..d18a9b5 100644
--- a/usr.bin/who/who.c
+++ b/usr.bin/who/who.c
@@ -34,22 +34,23 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+
+__FBSDID("$FreeBSD$");
+
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
+#endif
#ifndef lint
-#if 0
-static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
#include <sys/types.h>
#include <sys/file.h>
+
#include <err.h>
#include <langinfo.h>
#include <locale.h>
@@ -62,17 +63,18 @@ static const char rcsid[] =
#include <utmp.h>
static void usage __P((void));
-void output __P((struct utmp *));
+static void output __P((struct utmp *));
+static FILE *file __P((const char *));
int
main(argc, argv)
int argc;
char **argv;
{
- register char *p;
+ char *p;
struct utmp usr;
struct passwd *pw;
- FILE *ufp, *file();
+ FILE *ufp;
char *t;
(void) setlocale(LC_TIME, "");
@@ -154,9 +156,9 @@ output(up)
(void)putchar('\n');
}
-FILE *
+static FILE *
file(name)
- char *name;
+ const char *name;
{
FILE *ufp;
OpenPOWER on IntegriCloud