mirror of https://gitee.com/openkylin/libvirt.git
Fix two uninitialized variable warnings
gcc only reports them when compiling with -O3.
This commit is contained in:
parent
ebea59ad82
commit
fc0ab50abd
|
@ -91,7 +91,7 @@ ifaceGetFlags(const char *ifname, short *flags) {
|
|||
|
||||
int
|
||||
ifaceIsUp(const char *ifname, bool *up) {
|
||||
short flags;
|
||||
short flags = 0;
|
||||
int rc = ifaceGetFlags(ifname, &flags);
|
||||
|
||||
if (rc)
|
||||
|
|
|
@ -2857,7 +2857,7 @@ static bool
|
|||
cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
|
||||
{
|
||||
virDomainPtr dom;
|
||||
int count;
|
||||
int count = 0;
|
||||
bool ret = true;
|
||||
int maximum = vshCommandOptBool(cmd, "maximum");
|
||||
int config = vshCommandOptBool(cmd, "config");
|
||||
|
|
Loading…
Reference in New Issue