]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix uninitialized variables
authorGuido Günther <agx@sigxcpu.org>
Fri, 30 Nov 2012 17:51:28 +0000 (18:51 +0100)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:53:41 +0000 (16:53 -0500)
detecet by

http://honk.sigxcpu.org:8001/job/libvirt-build/348/console
(cherry picked from commit d01e427e01e272825d3c60acbace11c7e3154ca5)

src/qemu/qemu_monitor.c

index 2796a613dc795b5f98c27724afe0274be2f945b5..deb30a8c77cea0723ec7eeb267f65554cb665d87 100644 (file)
@@ -2373,7 +2373,7 @@ int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon,
                                  int vlan,
                                  const char *netname)
 {
-    int ret;
+    int ret = -1;
     VIR_DEBUG("mon=%p netname=%s",
           mon, netname);
 
@@ -2505,7 +2505,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",