]> xenbits.xensource.com Git - libvirt.git/commitdiff
rbd: Use %zu for uint64_t instead of casting to unsigned long long
authorWido den Hollander <wido@widodh.nl>
Sat, 30 Jan 2016 15:15:34 +0000 (16:15 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 5 Feb 2016 19:29:24 +0000 (14:29 -0500)
This was only used in debugging messages and not in any real code.

Ceph/RBD uses uint64_t for sizes internally and they can be printed
with %zu without any need for casting.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
src/storage/storage_backend_rbd.c

index 4a8d90d33dcc554692285330b499e4976e57d82d..5d7337093681a6006e38f1b0a4d0da7b50e42dba 100644 (file)
@@ -303,10 +303,9 @@ volStorageBackendRBDRefreshVolInfo(virStorageVolDefPtr vol,
         goto cleanup;
     }
 
-    VIR_DEBUG("Refreshed RBD image %s/%s (size: %llu obj_size: %llu num_objs: %llu)",
-              pool->def->source.name, vol->name, (unsigned long long)info.size,
-              (unsigned long long)info.obj_size,
-              (unsigned long long)info.num_objs);
+    VIR_DEBUG("Refreshed RBD image %s/%s (size: %zu obj_size: %zu num_objs: %zu)",
+              pool->def->source.name, vol->name, info.size, info.obj_size,
+              info.num_objs);
 
     vol->target.capacity = info.size;
     vol->target.allocation = info.obj_size * info.num_objs;
@@ -369,10 +368,9 @@ virStorageBackendRBDRefreshPool(virConnectPtr conn,
     pool->def->available = clusterstat.kb_avail * 1024;
     pool->def->allocation = poolstat.num_bytes;
 
-    VIR_DEBUG("Utilization of RBD pool %s: (kb: %llu kb_avail: %llu num_bytes: %llu)",
-              pool->def->source.name, (unsigned long long)clusterstat.kb,
-              (unsigned long long)clusterstat.kb_avail,
-              (unsigned long long)poolstat.num_bytes);
+    VIR_DEBUG("Utilization of RBD pool %s: (kb: %zu kb_avail: %zu num_bytes: %zu)",
+              pool->def->source.name, clusterstat.kb, clusterstat.kb_avail,
+              poolstat.num_bytes);
 
     while (true) {
         if (VIR_ALLOC_N(names, max_size) < 0)