]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Move simplification variable to begining of the function
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 1 Oct 2015 05:23:38 +0000 (07:23 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 2 Oct 2015 14:14:26 +0000 (16:14 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_command.c

index 2f0f7d46938a37e3d942db95a68df6377d24c57f..c8d320e98f23af89aabbb5ac319d68a90b396c3f 100644 (file)
@@ -5052,6 +5052,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
     virBitmapPtr nodemask = NULL;
     int ret = -1;
     virJSONValuePtr props = NULL;
+    bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode);
 
     *backendProps = NULL;
     *backendType = NULL;
@@ -5204,7 +5205,6 @@ qemuBuildMemoryBackendStr(unsigned long long size,
     }
 
     if (!hugepage && !pagesize) {
-        bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, guestNode);
 
         if ((userNodeset || nodeSpecified || force) &&
             !virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM)) {