mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-08 16:54:49 +00:00
virsh: avoid uninitialized variable
Detected by Coverity; neither vshCmddefHelp nor vshCmdOptParse was initializing opts_required. * tools/virsh.c (vshCmddefOptParse): Always initialize bitmaps.
This commit is contained in:
parent
6f9432fcaf
commit
cdb0e0dc3f
@ -11915,12 +11915,15 @@ vshCmddefGetInfo(const vshCmdDef * cmd, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vshCmddefOptParse(const vshCmdDef *cmd, uint32_t* opts_need_arg,
|
vshCmddefOptParse(const vshCmdDef *cmd, uint32_t *opts_need_arg,
|
||||||
uint32_t *opts_required)
|
uint32_t *opts_required)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
bool optional = false;
|
bool optional = false;
|
||||||
|
|
||||||
|
*opts_need_arg = 0;
|
||||||
|
*opts_required = 0;
|
||||||
|
|
||||||
if (!cmd->opts)
|
if (!cmd->opts)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user