]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: Turn def->maxvcpus into size_t
authorPeter Krempa <pkrempa@redhat.com>
Mon, 26 Oct 2015 14:16:58 +0000 (15:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 9 Dec 2015 13:57:12 +0000 (14:57 +0100)
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
src/conf/domain_conf.h

index 445d671d3377188ef096dad84b76ae4e1e146163..202b2374899ca1af469cb36ca522601f21b7ee25 100644 (file)
@@ -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;
     }
index 7139badc1371e8a61cf62ff2db937a94ebf380e4..deabea4093aa6ef5fb1627fbc98bcc75a59d5689 100644 (file)
@@ -2219,7 +2219,7 @@ struct _virDomainDef {
     virDomainMemtune mem;
 
     unsigned int vcpus;
-    unsigned int maxvcpus;
+    size_t maxvcpus;
     int placement_mode;
     virBitmapPtr cpumask;