]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: cpupin: Remove useless checking of vcpupin element count
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Aug 2014 12:20:37 +0000 (14:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 18 Aug 2014 15:43:05 +0000 (17:43 +0200)
The check doesn't make much sense as right below it the entries are
either checked for duplicity or ignored in some cases. Having this check
doesn't actually forbid passing invalid values.

src/conf/domain_conf.c

index 5c762fab40e9cc8e4574a62fab2d9651dd65abe6..82f3ee66888d2a09ebfe1a14a3bf7c229e5ad3d2 100644 (file)
@@ -11993,12 +11993,6 @@ virDomainDefParseXML(xmlDocPtr xml,
     if (n && VIR_ALLOC_N(def->cputune.vcpupin, n) < 0)
         goto error;
 
-    if (n > def->maxvcpus) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("vcpupin nodes must be less than maxvcpus"));
-        goto error;
-    }
-
     for (i = 0; i < n; i++) {
         virDomainVcpuPinDefPtr vcpupin = NULL;
         vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0);