[PATCH 05/34] conf: Use local copy of maxvcpus in virDomainVcpuParse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the local variable rather than getting it all the time from the
struct. This will simplify further refactors.
---
 src/conf/domain_conf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0ac7dbf..3c8a926 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14664,13 +14664,13 @@ virDomainVcpuParse(virDomainDefPtr def,
             goto cleanup;
         }

-        def->vcpus = def->maxvcpus;
+        def->vcpus = maxvcpus;
     }

-    if (def->maxvcpus < def->vcpus) {
+    if (maxvcpus < def->vcpus) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("maxvcpus must not be less than current vcpus "
-                         "(%u < %u)"), def->maxvcpus, def->vcpus);
+                         "(%u < %u)"), maxvcpus, def->vcpus);
         goto cleanup;
     }

-- 
2.6.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]