From 0dac67d65f9fe0ad9c2e8916cf8e41269101c5a9 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Tue, 4 Jan 2005 03:57:20 +0000 Subject: [PATCH] nologin(8) does not seem to require any command line parameters, so remove argc and argv from main() argument. At the same time, user and tt is not likely to be changed during execution so mark them const. This commit should guarantee nologin to pass WARNS=6. Tested on: i386 MFC After: 1 month --- usr.sbin/nologin/nologin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/nologin/nologin.c b/usr.sbin/nologin/nologin.c index a13c517d0554..6522aa68f501 100644 --- a/usr.sbin/nologin/nologin.c +++ b/usr.sbin/nologin/nologin.c @@ -34,9 +34,9 @@ __FBSDID("$FreeBSD$"); #define MESSAGE "This account is currently not available.\n" int -main(int argc, char *argv[]) +main(void) { - char *user, *tt; + const char *user, *tt; if ((tt = ttyname(0)) == NULL) tt = "UNKNOWN";