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
|
int
|
||||||
ifaceIsUp(const char *ifname, bool *up) {
|
ifaceIsUp(const char *ifname, bool *up) {
|
||||||
short flags;
|
short flags = 0;
|
||||||
int rc = ifaceGetFlags(ifname, &flags);
|
int rc = ifaceGetFlags(ifname, &flags);
|
||||||
|
|
||||||
if (rc)
|
if (rc)
|
||||||
|
|
|
@ -2857,7 +2857,7 @@ static bool
|
||||||
cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
|
cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
|
||||||
{
|
{
|
||||||
virDomainPtr dom;
|
virDomainPtr dom;
|
||||||
int count;
|
int count = 0;
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
int maximum = vshCommandOptBool(cmd, "maximum");
|
int maximum = vshCommandOptBool(cmd, "maximum");
|
||||||
int config = vshCommandOptBool(cmd, "config");
|
int config = vshCommandOptBool(cmd, "config");
|
||||||
|
|
Loading…
Reference in New Issue