From 10087386b94f19cdf1244c99968d0a8354ea2813 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 17 Jul 2014 12:41:21 -0400 Subject: [PATCH] storage: Convert 'building' into a bool Rather than a unsigned int, use a 'bool' since that's how it was used. --- src/conf/storage_conf.h | 2 +- src/storage/storage_driver.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index badf7a3741..54c978dc42 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -63,7 +63,7 @@ struct _virStorageVolDef { char *key; int type; /* virStorageVolType */ - unsigned int building; + bool building; unsigned int in_use; virStorageVolSource source; diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 441da21897..3830867c1f 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -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--;