]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Use virStoragePoolObjDefUseNewDef
authorJohn Ferlan <jferlan@redhat.com>
Wed, 26 Jul 2017 17:05:03 +0000 (13:05 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Sep 2017 12:31:56 +0000 (08:31 -0400)
Use the new accessor API for storage_driver.

src/storage/storage_driver.c

index 72190cffbd1d27ca58bf21b27a38fa3bc18a28b7..7db1f546376f16680bae1814d756d5353c0af434 100644 (file)
@@ -94,10 +94,8 @@ virStoragePoolUpdateInactive(virStoragePoolObjPtr *objptr)
     if (!virStoragePoolObjGetConfigFile(obj)) {
         virStoragePoolObjRemove(&driver->pools, obj);
         *objptr = NULL;
-    } else if (obj->newDef) {
-        virStoragePoolDefFree(obj->def);
-        obj->def = obj->newDef;
-        obj->newDef = NULL;
+    } else if (virStoragePoolObjGetNewDef(obj)) {
+        virStoragePoolObjDefUseNewDef(obj);
     }
 }