summaryrefslogtreecommitdiffstats
path: root/sbin/reboot
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-01-25 08:24:06 +0000
committerdelphij <delphij@FreeBSD.org>2005-01-25 08:24:06 +0000
commitc08fa3f2c0925b3b798923f79a9a443a046da98e (patch)
treea7f8c88655319c0a9023957501776dc2881cf0e8 /sbin/reboot
parent106964bd37d13acd9ec149548ca1b47752575415 (diff)
downloadFreeBSD-src-c08fa3f2c0925b3b798923f79a9a443a046da98e.zip
FreeBSD-src-c08fa3f2c0925b3b798923f79a9a443a046da98e.tar.gz
Code style tweaks: Use static and const where suitable.
Diffstat (limited to 'sbin/reboot')
-rw-r--r--sbin/reboot/reboot.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 0be2300..195c094 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -56,19 +56,18 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-void usage(void);
-u_int get_pageins(void);
+static void usage(void);
+static u_int get_pageins(void);
int dohalt;
int
main(int argc, char *argv[])
{
- struct passwd *pw;
+ const struct passwd *pw;
int ch, howto, i, fd, lflag, nflag, qflag, pflag, sverrno;
u_int pageins;
- char *kernel = NULL, *p;
- const char *user;
+ const char *p, *user, *kernel = NULL;
if (strstr((p = rindex(*argv, '/')) ? p + 1 : *argv, "halt")) {
dohalt = 1;
@@ -203,7 +202,7 @@ restart:
/* NOTREACHED */
}
-void
+static void
usage()
{
(void)fprintf(stderr, "usage: %s [-dnpq] [-k kernel]\n",
@@ -211,7 +210,7 @@ usage()
exit(1);
}
-u_int
+static u_int
get_pageins()
{
u_int pageins;
OpenPOWER on IntegriCloud