From: Peter Krempa Date: Mon, 26 Oct 2015 14:16:58 +0000 (+0100) Subject: conf: Turn def->maxvcpus into size_t X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=80a59b4aaecd0bbd81c2c0c2e58bf2e7c0b90ae2;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git conf: Turn def->maxvcpus into size_t 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. --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 445d671d3..202b23748 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1317,7 +1317,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 7139badc1..deabea409 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2219,7 +2219,7 @@ struct _virDomainDef { virDomainMemtune mem; unsigned int vcpus; - unsigned int maxvcpus; + size_t maxvcpus; int placement_mode; virBitmapPtr cpumask;