提交 caa1b711 编写于 作者: J Ján Tomko

qemuBuildMemoryCellBackendStr: remove useless ret variable

Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 dfe0ce93
......@@ -3590,14 +3590,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
{
VIR_AUTOPTR(virJSONValue) props = NULL;
VIR_AUTOFREE(char *) alias = NULL;
int ret = -1;
int rc;
virDomainMemoryDef mem = { 0 };
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
cell);
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
goto cleanup;
return -1;
mem.size = memsize;
mem.targetNode = cell;
......@@ -3605,16 +3604,12 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
if ((rc = qemuBuildMemoryBackendProps(&props, alias, cfg,
priv, def, &mem, false)) < 0)
goto cleanup;
return -1;
if (virQEMUBuildObjectCommandlineFromJSON(buf, props) < 0)
goto cleanup;
ret = rc;
cleanup:
return -1;
return ret;
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册