diff options
author | 2006-06-26 06:16:09 +0000 | |
---|---|---|
committer | 2006-06-26 06:16:09 +0000 | |
commit | bd755cd00bed3ae51edf39b761b1bef9584aa0bb (patch) | |
tree | 2b0501ca566fd6749ed4f276c9cd257fd5ec305b | |
parent | do not allow a Jumbo size MTU yet. (diff) | |
download | wireguard-openbsd-bd755cd00bed3ae51edf39b761b1bef9584aa0bb.tar.xz wireguard-openbsd-bd755cd00bed3ae51edf39b761b1bef9584aa0bb.zip |
Code cleanup/shortening. No binary changes.
-rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index b35c0ef51cb..e0d60620503 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: watchdogd.c,v 1.6 2006/01/17 11:38:50 mbalmer Exp $ */ +/* $OpenBSD: watchdogd.c,v 1.7 2006/06/26 06:16:09 mbalmer Exp $ */ /* * Copyright (c) 2005 Marc Balmer <mbalmer@openbsd.org> @@ -42,6 +42,7 @@ usage(void) exit(1); } +/* ARGSUSED */ void sighdlr(int signum) { @@ -53,34 +54,29 @@ main(int argc, char *argv[]) { const char *errstr; size_t len; - u_int interval, period, nperiod; + u_int interval = 0, period = 30, nperiod; int ch, trigauto, sauto, speriod; - int daemonize, retval; + int daemonize = 1, retval = 1; int mib[3]; - interval = 0; - period = 30; - daemonize = 1; - retval = 1; - while ((ch = getopt(argc, argv, "di:p:")) != -1) { switch (ch) { case 'd': daemonize = 0; break; case 'i': - interval = (int)strtonum(optarg, 1LL, 86400LL, &errstr); + interval = (u_int)strtonum(optarg, 1LL, 86400LL, + &errstr); if (errstr) errx(1, "interval is %s: %s", errstr, optarg); break; case 'p': - period = (int)strtonum(optarg, 2LL, 86400LL, &errstr); + period = (u_int)strtonum(optarg, 2LL, 86400LL, &errstr); if (errstr) errx(1, "period is %s: %s", errstr, optarg); break; default: usage(); - /* NOTREACHED */ } } |