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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user