[PATCH 17/29] storage: Add spaces after casts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/storage/storage_backend_disk.c    |  4 ++--
 src/storage/storage_backend_fs.c      |  2 +-
 src/storage/storage_backend_gluster.c | 10 +++++-----
 src/storage/storage_backend_iscsi.c   |  2 +-
 src/storage/storage_backend_mpath.c   |  2 +-
 src/storage/storage_backend_rbd.c     |  8 ++++----
 src/storage/storage_util.c            |  8 ++++----
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 7b4549c34d65..54a6e10e4a19 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -553,7 +553,7 @@ static int
 virStorageVolNumOfPartTypes(virStorageVolDefPtr def,
                             const void *opaque)
 {
-    struct virStorageVolNumData *data = (struct virStorageVolNumData *)opaque;
+    struct virStorageVolNumData *data = (struct virStorageVolNumData *) opaque;
 
     if (def->source.partType == VIR_STORAGE_VOL_DISK_TYPE_PRIMARY ||
         def->source.partType == VIR_STORAGE_VOL_DISK_TYPE_EXTENDED)
@@ -670,7 +670,7 @@ virStorageBackendDiskPartBoundaries(virStoragePoolObjPtr pool,
     unsigned long long alignedAllocation = allocation;
     virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
     virStoragePoolSourceDevicePtr dev = &def->source.devices[0];
-    unsigned long long cylinderSize = (unsigned long long)dev->geometry.heads *
+    unsigned long long cylinderSize = (unsigned long long) dev->geometry.heads *
                                       dev->geometry.sectors * SECTOR_SIZE;
 
     VIR_DEBUG("find free area: allocation %llu, cyl size %llu", allocation,
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 9b0fcf92c5cd..34be92ffebb6 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -735,7 +735,7 @@ virStorageFileBackendFileInit(virStorageSourcePtr src)
     VIR_DEBUG("initializing FS storage file %p (%s:%s)[%u:%u]", src,
               virStorageTypeToString(virStorageSourceGetActualType(src)),
               src->path,
-              (unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
+              (unsigned int) src->drv->uid, (unsigned int) src->drv->gid);
 
     if (VIR_ALLOC(priv) < 0)
         return -1;
diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
index c6cc531e2ff6..030edba078fb 100644
--- a/src/storage/storage_backend_gluster.c
+++ b/src/storage/storage_backend_gluster.c
@@ -404,10 +404,10 @@ virStorageBackendGlusterRefreshPool(virStoragePoolObjPtr pool)
         goto cleanup;
     }
 
-    def->capacity = ((unsigned long long)sb.f_frsize *
-                     (unsigned long long)sb.f_blocks);
-    def->available = ((unsigned long long)sb.f_bfree *
-                      (unsigned long long)sb.f_frsize);
+    def->capacity = ((unsigned long long) sb.f_frsize *
+                     (unsigned long long) sb.f_blocks);
+    def->available = ((unsigned long long) sb.f_bfree *
+                      (unsigned long long) sb.f_frsize);
     def->allocation = def->capacity - def->available;
 
     ret = 0;
@@ -642,7 +642,7 @@ virStorageFileBackendGlusterInit(virStorageSourcePtr src)
     VIR_DEBUG("initializing gluster storage file %p "
               "(priv='%p' volume='%s' path='%s') as [%u:%u]",
               src, priv, src->volume, src->path,
-              (unsigned int)src->drv->uid, (unsigned int)src->drv->gid);
+              (unsigned int) src->drv->uid, (unsigned int) src->drv->gid);
 
     if (!(priv->vol = glfs_new(src->volume))) {
         virReportOOMError();
diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
index 7871d1915b11..f75c73ef0e6d 100644
--- a/src/storage/storage_backend_iscsi.c
+++ b/src/storage/storage_backend_iscsi.c
@@ -311,7 +311,7 @@ virStorageBackendISCSISetAuth(const char *portal,
         virISCSINodeUpdate(portal,
                            source->devices[0].path,
                            "node.session.auth.password",
-                           (const char *)secret_value) < 0)
+                           (const char *) secret_value) < 0)
         goto cleanup;
 
     ret = 0;
diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c
index 5dcc40f601f3..27337cdf19b0 100644
--- a/src/storage/storage_backend_mpath.c
+++ b/src/storage/storage_backend_mpath.c
@@ -195,7 +195,7 @@ virStorageBackendCreateVols(virStoragePoolObjPtr pool,
          * any way to avoid this series of casts. */
         VIR_WARNINGS_NO_CAST_ALIGN
         next = names->next;
-        names = (struct dm_names *)(((char *)names) + next);
+        names = (struct dm_names *) (((char *) names) + next);
         VIR_WARNINGS_RESET
 
     } while (next);
diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c
index 642cacb67362..34a12a19a883 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -303,7 +303,7 @@ virStorageBackendRBDRefreshVolInfoCb(uint64_t offset ATTRIBUTE_UNUSED,
                                      int exists,
                                      void *arg)
 {
-    size_t *used_size = (size_t *)(arg);
+    size_t *used_size = (size_t *) (arg);
     if (exists)
         (*used_size) += len;
 
@@ -847,10 +847,10 @@ virStorageBackendRBDSnapshotFindNoDiff(rbd_image_t image,
  */
 #if LIBRBD_VERSION_CODE > 265
         r = rbd_diff_iterate2(image, snaps[i].name, 0, info.size, 0, 1,
-                              virStorageBackendRBDIterateCb, (void *)&diff);
+                              virStorageBackendRBDIterateCb, (void *) &diff);
 #else
         r = rbd_diff_iterate(image, snaps[i].name, 0, info.size,
-                             virStorageBackendRBDIterateCb, (void *)&diff);
+                             virStorageBackendRBDIterateCb, (void *) &diff);
 #endif
 
         if (r < 0) {
@@ -988,7 +988,7 @@ virStorageBackendRBDCloneImage(rados_ioctx_t io,
         VIR_DEBUG("No RBD snapshot with zero delta could be found for image %s",
                   origvol);
 
-        virBufferAsprintf(&snapname, "libvirt-%d", (int)virRandomInt(65534));
+        virBufferAsprintf(&snapname, "libvirt-%d", (int) virRandomInt(65534));
 
         if (virBufferCheckError(&snapname) < 0)
             goto cleanup;
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 897dfdaaee4d..3b675775e249 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -3771,10 +3771,10 @@ virStorageBackendRefreshLocal(virStoragePoolObjPtr pool)
         goto cleanup;
     }
 
-    def->capacity = ((unsigned long long)sb.f_frsize *
-                     (unsigned long long)sb.f_blocks);
-    def->available = ((unsigned long long)sb.f_bfree *
-                      (unsigned long long)sb.f_frsize);
+    def->capacity = ((unsigned long long) sb.f_frsize *
+                     (unsigned long long) sb.f_blocks);
+    def->available = ((unsigned long long) sb.f_bfree *
+                      (unsigned long long) sb.f_frsize);
     def->allocation = def->capacity - def->available;
 
     def->target.perms.mode = target->perms->mode;
-- 
2.17.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux