From 5f12b8444ca123177ac972a23965fa4303a9484c Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 1 Oct 2015 07:30:39 +0200 Subject: [PATCH] qemu: Move memory size detection to the top of the function To get rid of very long line and make it more readable. Signed-off-by: Martin Kletzander --- src/qemu/qemu_command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c8d320e98f..6168745ac1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5249,17 +5249,17 @@ 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), - 0, cell, - NULL, auto_nodeset, - def, qemuCaps, cfg, - &backendType, &props, false)) < 0) + if ((rc = qemuBuildMemoryBackendStr(memsize, 0, cell, NULL, auto_nodeset, + def, qemuCaps, cfg, &backendType, + &props, false)) < 0) goto cleanup; if (!(*backendStr = qemuBuildObjectCommandlineFromJSON(backendType, -- GitLab