Use modern style defination for main() and move a extern

declaration to global section.

Bump WARNS?= to 6
This commit is contained in:
Xin LI 2005-01-25 08:37:04 +00:00
parent 36737a0b77
commit f906f84330
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140796
2 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,9 @@
PROG= shutdown PROG= shutdown
MAN= shutdown.8 MAN= shutdown.8
WARNS?= 6
BINOWN= root BINOWN= root
BINGRP= operator BINGRP= operator
BINMODE=4550 BINMODE=4550

View File

@ -102,10 +102,10 @@ void timeout(int);
void timewarn(int); void timewarn(int);
void usage(const char *); void usage(const char *);
extern const char **environ;
int int
main(argc, argv) main(int argc, char **argv)
int argc;
char *argv[];
{ {
char *p, *endp; char *p, *endp;
struct passwd *pw; struct passwd *pw;
@ -276,7 +276,6 @@ timewarn(timeleft)
static char hostname[MAXHOSTNAMELEN + 1]; static char hostname[MAXHOSTNAMELEN + 1];
FILE *pf; FILE *pf;
char wcmd[MAXPATHLEN + 4]; char wcmd[MAXPATHLEN + 4];
extern const char **environ;
if (!first++) if (!first++)
(void)gethostname(hostname, sizeof(hostname)); (void)gethostname(hostname, sizeof(hostname));