Static'ify internal methods and use prototype.

This commit is contained in:
Xin LI 2009-09-28 07:42:52 +00:00
parent 7a918edff2
commit 9534110f48
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197560

View File

@ -92,15 +92,15 @@ static int dohalt, dopower, doreboot, killflg, mbuflen, oflag;
static char mbuf[BUFSIZ]; static char mbuf[BUFSIZ];
static const char *nosync, *whom; static const char *nosync, *whom;
void badtime(void); static void badtime(void);
void die_you_gravy_sucking_pig_dog(void); static void die_you_gravy_sucking_pig_dog(void);
void finish(int); static void finish(int);
void getoffset(char *); static void getoffset(char *);
void loop(void); static void loop(void);
void nolog(void); static void nolog(void);
void timeout(int); static void timeout(int);
void timewarn(int); static void timewarn(int);
void usage(const char *); static void usage(const char *);
extern const char **environ; extern const char **environ;
@ -219,8 +219,8 @@ main(int argc, char **argv)
return(0); return(0);
} }
void static void
loop() loop(void)
{ {
struct interval *tp; struct interval *tp;
u_int sltime; u_int sltime;
@ -268,7 +268,7 @@ static const char *restricted_environ[] = {
NULL NULL
}; };
void static void
timewarn(int timeleft) timewarn(int timeleft)
{ {
static int first; static int first;
@ -318,13 +318,13 @@ timewarn(int timeleft)
} }
} }
void static void
timeout(int signo __unused) timeout(int signo __unused)
{ {
longjmp(alarmbuf, 1); longjmp(alarmbuf, 1);
} }
void static void
die_you_gravy_sucking_pig_dog() die_you_gravy_sucking_pig_dog()
{ {
char *empty_environ[] = { NULL }; char *empty_environ[] = { NULL };
@ -385,7 +385,7 @@ die_you_gravy_sucking_pig_dog()
#define ATOI2(p) (p[0] - '0') * 10 + (p[1] - '0'); p += 2; #define ATOI2(p) (p[0] - '0') * 10 + (p[1] - '0'); p += 2;
void static void
getoffset(char *timearg) getoffset(char *timearg)
{ {
struct tm *lt; struct tm *lt;
@ -468,8 +468,8 @@ getoffset(char *timearg)
} }
#define NOMSG "\n\nNO LOGINS: System going down at " #define NOMSG "\n\nNO LOGINS: System going down at "
void static void
nolog() nolog(void)
{ {
int logfd; int logfd;
char *ct; char *ct;
@ -490,7 +490,7 @@ nolog()
} }
} }
void static void
finish(int signo __unused) finish(int signo __unused)
{ {
if (!killflg) if (!killflg)
@ -498,13 +498,13 @@ finish(int signo __unused)
exit(0); exit(0);
} }
void static void
badtime() badtime()
{ {
errx(1, "bad time format"); errx(1, "bad time format");
} }
void static void
usage(const char *cp) usage(const char *cp)
{ {
if (cp != NULL) if (cp != NULL)