[libvirt] [PATCH 15/34] conf: Turn def->maxvcpus into size_t
Peter Krempa
pkrempa at redhat.com
Fri Nov 20 15:22:05 UTC 2015
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
More information about the libvir-list
mailing list