[PATCH 2/5] qemu: Move memory size detection to the top of the function

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

 



To get rid of very long line and make it more readable.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index f303a4b5bd1e..492313cbcba9 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5249,13 +5249,15 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
     const char *backendType;
     int ret = -1;
     int rc;
+    unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
+                                                                cell);

     *backendStr = NULL;

     if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
         goto cleanup;

-    if ((rc = qemuBuildMemoryBackendStr(virDomainNumaGetNodeMemorySize(def->numa, cell),
+    if ((rc = qemuBuildMemoryBackendStr(memsize,
                                         0, cell,
                                         NULL, auto_nodeset,
                                         def, qemuCaps, cfg,
-- 
2.6.0

--
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]