]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Convert 'building' into a bool
authorJohn Ferlan <jferlan@redhat.com>
Thu, 17 Jul 2014 16:41:21 +0000 (12:41 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 17 Jul 2014 20:28:50 +0000 (16:28 -0400)
Rather than a unsigned int, use a 'bool' since that's how it was used.

src/conf/storage_conf.h
src/storage/storage_driver.c

index badf7a37413d036949eb7052c093fc9e27f31e0c..54c978dc421c00b0bea99a5d40b5735468dfe9d7 100644 (file)
@@ -63,7 +63,7 @@ struct _virStorageVolDef {
     char *key;
     int type; /* virStorageVolType */
 
-    unsigned int building;
+    bool building;
     unsigned int in_use;
 
     virStorageVolSource source;
index 441da21897cd1a5409a185c7ed6193e448f10aeb..3830867c1f6a1310ceb9bf068634a4070931815d 100644 (file)
@@ -1691,7 +1691,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
 
         /* Drop the pool lock during volume allocation */
         pool->asyncjobs++;
-        voldef->building = 1;
+        voldef->building = true;
         virStoragePoolObjUnlock(pool);
 
         buildret = backend->buildVol(obj->conn, pool, buildvoldef, flags);
@@ -1700,7 +1700,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
         virStoragePoolObjLock(pool);
         storageDriverUnlock(driver);
 
-        voldef->building = 0;
+        voldef->building = false;
         pool->asyncjobs--;
 
         if (buildret < 0) {
@@ -1858,7 +1858,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
 
     /* Drop the pool lock during volume allocation */
     pool->asyncjobs++;
-    newvol->building = 1;
+    newvol->building = true;
     origvol->in_use++;
     virStoragePoolObjUnlock(pool);
 
@@ -1876,7 +1876,7 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
     storageDriverUnlock(driver);
 
     origvol->in_use--;
-    newvol->building = 0;
+    newvol->building = false;
     allocation = newvol->target.allocation;
     pool->asyncjobs--;