From 40a7f94cb90a79424a3ad3b483bf6f8f42d6b5ce Mon Sep 17 00:00:00 2001
From: dd
Date: Sun, 24 Jun 2001 18:41:30 +0000
Subject: [PATCH] Constify and set WARNS=2.
Submitted by: Mike Barcroft
Reviewed by: md5(1)
---
usr.sbin/ac/Makefile | 1 +
usr.sbin/ac/ac.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/usr.sbin/ac/Makefile b/usr.sbin/ac/Makefile
index 0fac2fbdbab9..5ddc6e41081e 100644
--- a/usr.sbin/ac/Makefile
+++ b/usr.sbin/ac/Makefile
@@ -1,6 +1,7 @@
# $FreeBSD$
PROG= ac
+WARNS?= 2
MAN= ac.8
# If "CONSOLE_TTY" is not defined, this program is compatible with the
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c
index e6b0ae2e18d3..3b2c39db68ba 100644
--- a/usr.sbin/ac/ac.c
+++ b/usr.sbin/ac/ac.c
@@ -87,11 +87,11 @@ int main __P((int, char **));
int ac __P((FILE *));
struct tty_list *add_tty __P((char *));
int do_tty __P((char *));
-FILE *file __P((char *));
+FILE *file __P((const char *));
struct utmp_list *log_in __P((struct utmp_list *, struct utmp *));
struct utmp_list *log_out __P((struct utmp_list *, struct utmp *));
int on_console __P((struct utmp_list *));
-void show __P((char *, time_t));
+void show __P((const char *, time_t));
void show_today __P((struct user_list *, struct utmp_list *,
time_t));
void show_users __P((struct user_list *));
@@ -103,7 +103,7 @@ void usage __P((void));
*/
FILE *
file(name)
- char *name;
+ const char *name;
{
FILE *fp;
@@ -293,7 +293,7 @@ main(argc, argv)
*/
void
show(name, secs)
- char *name;
+ const char *name;
time_t secs;
{
(void)printf("\t%-*s %8.2f\n", UT_NAMESIZE, name,