[libvirt] [PATCH] Fix uninitialized variables

detecet by http://honk.sigxcpu.org:8001/job/libvirt-build/348/console --- Probably o.k. to push under the build breaker rule but I'd better check. Cheers, -- Guido src/qemu/qemu_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c1f7c41..f85bb76 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2408,7 +2408,7 @@ int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon, int vlan, const char *netname) { - int ret; + int ret = -1; VIR_DEBUG("mon=%p netname=%s", mon, netname); @@ -2541,7 +2541,7 @@ int qemuMonitorAttachDrive(qemuMonitorPtr mon, mon, drivestr, controllerAddr->domain, controllerAddr->bus, controllerAddr->slot, controllerAddr->function); - int ret; + int ret = 1; if (!mon) { virReportError(VIR_ERR_INVALID_ARG, "%s", -- 1.7.10.4

On Fri, Nov 30, 2012 at 07:13:01PM +0100, Guido Günther wrote:
detecet by
http://honk.sigxcpu.org:8001/job/libvirt-build/348/console --- Probably o.k. to push under the build breaker rule but I'd better check. Cheers, -- Guido
src/qemu/qemu_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c1f7c41..f85bb76 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2408,7 +2408,7 @@ int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon, int vlan, const char *netname) { - int ret; + int ret = -1; VIR_DEBUG("mon=%p netname=%s", mon, netname);
@@ -2541,7 +2541,7 @@ int qemuMonitorAttachDrive(qemuMonitorPtr mon, mon, drivestr, controllerAddr->domain, controllerAddr->bus, controllerAddr->slot, controllerAddr->function); - int ret; + int ret = 1;
if (!mon) { virReportError(VIR_ERR_INVALID_ARG, "%s",
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Fri, Nov 30, 2012 at 07:13:01PM +0100, Guido Günther wrote:
detecet by
s/detecet/detected/ [oh well, pushed already] -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Nov 30, 2012 at 06:38:31PM +0000, Daniel P. Berrange wrote:
On Fri, Nov 30, 2012 at 07:13:01PM +0100, Guido Günther wrote:
detecet by
http://honk.sigxcpu.org:8001/job/libvirt-build/348/console --- Probably o.k. to push under the build breaker rule but I'd better check. Cheers, -- Guido
src/qemu/qemu_monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c1f7c41..f85bb76 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2408,7 +2408,7 @@ int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon, int vlan, const char *netname) { - int ret; + int ret = -1; VIR_DEBUG("mon=%p netname=%s", mon, netname);
@@ -2541,7 +2541,7 @@ int qemuMonitorAttachDrive(qemuMonitorPtr mon, mon, drivestr, controllerAddr->domain, controllerAddr->bus, controllerAddr->slot, controllerAddr->function); - int ret; + int ret = 1;
if (!mon) { virReportError(VIR_ERR_INVALID_ARG, "%s",
ACK
Build back to green. Thanks, -- Guido
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Eric Blake
-
Guido Günther