]> xenbits.xensource.com Git - libvirt.git/commitdiff
Compiling with -Werror showed a possible use before initialization
authorChris Lalancette <clalance@redhat.com>
Thu, 16 Oct 2008 13:44:09 +0000 (13:44 +0000)
committerChris Lalancette <clalance@redhat.com>
Thu, 16 Oct 2008 13:44:09 +0000 (13:44 +0000)
in src/qemu_driver.c.  Make sure to initialize the olddisk ptr to NULL.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
ChangeLog
src/qemu_driver.c

index 322f837c6135a6756848c7ac785c4d299279cb56..1871db3dba9cde8bcf8961cfc82f2c3498c9e032 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 16 15:41:00 CEST 2008 Chris Lalancette <clalance@redhat.com>
+       * Compiling with -Werror showed a possible use before initialization
+       in src/qemu_driver.c.  Make sure to initialize the origdisk ptr to
+       NULL.
+
 Thu Oct 16 15:04:36 +0200 Jim Meyering <meyering@redhat.com>
 
        build: exempt *.ico files from the trailing blank check
index 624c8d8455f7977e6bfdbb465aed17bb771d8f99..a86b787614ebd15e8c440543c4edfe762624b929 100644 (file)
@@ -2401,6 +2401,7 @@ static int qemudDomainChangeEjectableMedia(virDomainPtr dom,
         return -1;
     }
 
+    origdisk = NULL;
     newdisk = dev->data.disk;
     for (i = 0 ; i < vm->def->ndisks ; i++) {
         if (vm->def->disks[i]->bus == newdisk->bus &&