]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: fix wrong evaluation in qemuDomainSetMemoryParameters
authorSatoru Moriya <satoru.moriya@hds.com>
Mon, 4 Mar 2013 17:27:45 +0000 (17:27 +0000)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 4 Mar 2013 17:34:28 +0000 (18:34 +0100)
19c6ad9a (qemu: Refactor qemuDomainSetMemoryParameters) introduced
a new macro, VIR_GET_LIMIT_PARAMETER(PARAM, VALUE). But if statement
in the macro is not correct and so set_XXXX flags are set to false
in the wrong. As a result, libvirt ignores all memtune parameters.
This patch fixes the conditional expression to work correctly.

Signed-off-by: Satoru Moriya <satoru.moriya@hds.com>
src/qemu/qemu_driver.c

index 7048ce9c28b32d97404d6bfa654a67728f22978c..42b8c77b21b7488803d61aee80766a5e4da0c8b3 100644 (file)
@@ -7280,7 +7280,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
     }
 
 #define VIR_GET_LIMIT_PARAMETER(PARAM, VALUE)                                \
-    if ((rc = virTypedParamsGetULLong(params, nparams, PARAM, &VALUE) < 0))  \
+    if ((rc = virTypedParamsGetULLong(params, nparams, PARAM, &VALUE)) < 0)  \
         goto cleanup;                                                        \
                                                                              \
     if (rc == 1)                                                             \