[PATCH 15/34] conf: Turn def->maxvcpus into size_t

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

 



Later on this will also be used to track size of the vcpu data array.
Use size_t so that we can utilize the memory allocation helpers.
---
 src/conf/domain_conf.c | 2 +-
 src/conf/domain_conf.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e8a3d10..897b643 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1463,7 +1463,7 @@ virDomainDefSetVCpus(virDomainDefPtr def,
 {
     if (vcpus > def->maxvcpus) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("maxvcpus must not be less than current vcpus (%u < %u)"),
+                       _("maxvcpus must not be less than current vcpus (%u < %zu)"),
                        vcpus, def->maxvcpus);
         return -1;
     }
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 0845b2b..3490f02 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2203,7 +2203,7 @@ struct _virDomainDef {
     virDomainMemtune mem;

     unsigned int vcpus;
-    unsigned int maxvcpus;
+    size_t maxvcpus;
     int placement_mode;
     virBitmapPtr cpumask;

-- 
2.6.2

--
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]