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 <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2015-10-01 07:30:39 +02:00
parent 04b57b4ae1
commit 5f12b8444c
1 changed files with 5 additions and 5 deletions

View File

@ -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,