summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-01-25 08:37:04 +0000
committerdelphij <delphij@FreeBSD.org>2005-01-25 08:37:04 +0000
commit3f5fb9f7fcac2810c21bc5ea7aa378b07389396b (patch)
tree22d9c42a1d2c0f8fa77a8cdee24f228c88056398 /sbin
parentc08fa3f2c0925b3b798923f79a9a443a046da98e (diff)
downloadFreeBSD-src-3f5fb9f7fcac2810c21bc5ea7aa378b07389396b.zip
FreeBSD-src-3f5fb9f7fcac2810c21bc5ea7aa378b07389396b.tar.gz
Use modern style defination for main() and move a extern
declaration to global section. Bump WARNS?= to 6
Diffstat (limited to 'sbin')
-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 e22759f..b7f232d 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 f719ebf..81c3620 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));
OpenPOWER on IntegriCloud