aboutsummaryrefslogtreecommitdiff
path: root/sbin/shutdown
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2005-01-25 08:37:04 +0000
committerXin LI <delphij@FreeBSD.org>2005-01-25 08:37:04 +0000
commitf906f84330a36affa5ff41802717143888c4e646 (patch)
tree22d9c42a1d2c0f8fa77a8cdee24f228c88056398 /sbin/shutdown
parent36737a0b77c075c6bc77377641578f0786604a1e (diff)
downloadsrc-f906f84330a36affa5ff41802717143888c4e646.tar.gz
src-f906f84330a36affa5ff41802717143888c4e646.zip
Use modern style defination for main() and move a extern
declaration to global section. Bump WARNS?= to 6
Notes
Notes: svn path=/head/; revision=140796
Diffstat (limited to 'sbin/shutdown')
-rw-r--r--sbin/shutdown/Makefile3
-rw-r--r--sbin/shutdown/shutdown.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/sbin/shutdown/Makefile b/sbin/shutdown/Makefile
index e22759fcc401..b7f232d090b5 100644
--- a/sbin/shutdown/Makefile
+++ b/sbin/shutdown/Makefile
@@ -3,6 +3,9 @@
PROG= shutdown
MAN= shutdown.8
+
+WARNS?= 6
+
BINOWN= root
BINGRP= operator
BINMODE=4550
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index f719ebf3a2c8..81c3620a0858 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -102,10 +102,10 @@ void timeout(int);
void timewarn(int);
void usage(const char *);
+extern const char **environ;
+
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
char *p, *endp;
struct passwd *pw;
@@ -276,7 +276,6 @@ timewarn(timeleft)
static char hostname[MAXHOSTNAMELEN + 1];
FILE *pf;
char wcmd[MAXPATHLEN + 4];
- extern const char **environ;
if (!first++)
(void)gethostname(hostname, sizeof(hostname));