From 80a59b4aaecd0bbd81c2c0c2e58bf2e7c0b90ae2 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 26 Oct 2015 15:16:58 +0100 Subject: [PATCH] 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. --- 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 445d671d33..202b237489 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 7139badc13..deabea4093 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; -- GitLab