Code style tweaks: Use static and const where suitable.
This commit is contained in:
parent
938253edc5
commit
5b58dca9a1
@ -56,19 +56,18 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
void usage(void);
|
static void usage(void);
|
||||||
u_int get_pageins(void);
|
static u_int get_pageins(void);
|
||||||
|
|
||||||
int dohalt;
|
int dohalt;
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct passwd *pw;
|
const struct passwd *pw;
|
||||||
int ch, howto, i, fd, lflag, nflag, qflag, pflag, sverrno;
|
int ch, howto, i, fd, lflag, nflag, qflag, pflag, sverrno;
|
||||||
u_int pageins;
|
u_int pageins;
|
||||||
char *kernel = NULL, *p;
|
const char *p, *user, *kernel = NULL;
|
||||||
const char *user;
|
|
||||||
|
|
||||||
if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
|
if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
|
||||||
dohalt = 1;
|
dohalt = 1;
|
||||||
@ -203,7 +202,7 @@ main(int argc, char *argv[])
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
(void)fprintf(stderr, "usage: %s [-dnpq] [-k kernel]\n",
|
(void)fprintf(stderr, "usage: %s [-dnpq] [-k kernel]\n",
|
||||||
@ -211,7 +210,7 @@ usage()
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
u_int
|
static u_int
|
||||||
get_pageins()
|
get_pageins()
|
||||||
{
|
{
|
||||||
u_int pageins;
|
u_int pageins;
|
||||||
|
Loading…
Reference in New Issue
Block a user