]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tools: Fix printf format
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 24 Sep 2018 08:45:44 +0000 (10:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 24 Sep 2018 11:39:58 +0000 (13:39 +0200)
We're passing size_t but using format for unsigned long.
Introduced in latest vshTable rework patches.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain.c
tools/virt-admin.c

index 2a416b919a0cdceab8226ad8613354e3f6040e1a..cfb0095333773d19f8392d066bdfac082a165614 100644 (file)
@@ -6949,7 +6949,7 @@ virshVcpuPinQuery(vshControl *ctl,
             if (!(pinInfo = virBitmapDataFormat(cpumap, cpumaplen)))
                 goto cleanup;
 
-            if (virAsprintf(&vcpuStr, "%lu", i) < 0)
+            if (virAsprintf(&vcpuStr, "%zu", i) < 0)
                 goto cleanup;
 
             if (vshTableRowAppend(table, vcpuStr, pinInfo, NULL) < 0)
index ce74489edfb7298d1e383dad4321af99d3419519..77928ddb8099e7081eb093eeaaca8ea0642efd87 100644 (file)
@@ -398,7 +398,7 @@ cmdSrvList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
 
     for (i = 0; i < nsrvs; i++) {
         VIR_AUTOFREE(char *) idStr = NULL;
-        if (virAsprintf(&idStr, "%lu", i) < 0)
+        if (virAsprintf(&idStr, "%zu", i) < 0)
             goto cleanup;
 
         if (vshTableRowAppend(table,