mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
reboot: initialize howto
Make static analyzers happy by initialzing howto to 0. Coverity is cranky that it could be used unused. But it's analysis is incomplete because the args to getopt when it wasn't initialized preclude it from being used.
This commit is contained in:
parent
fc773115fa
commit
e32de9626f
|
@ -175,7 +175,7 @@ main(int argc, char *argv[])
|
|||
{
|
||||
struct utmpx utx;
|
||||
const struct passwd *pw;
|
||||
int ch, howto, i, sverrno;
|
||||
int ch, howto = 0, i, sverrno;
|
||||
bool Dflag, fflag, lflag, Nflag, nflag, qflag;
|
||||
uint64_t pageins;
|
||||
const char *user, *kernel = NULL, *getopts = GETOPT_REBOOT;
|
||||
|
@ -188,6 +188,7 @@ main(int argc, char *argv[])
|
|||
donextboot = true;
|
||||
getopts = GETOPT_NEXTBOOT; /* Note: reboot's extra opts return '?' */
|
||||
} else {
|
||||
/* reboot */
|
||||
howto = 0;
|
||||
}
|
||||
Dflag = fflag = lflag = Nflag = nflag = qflag = false;
|
||||
|
|
Loading…
Reference in a new issue