mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemuBuildMemoryCellBackendStr: remove useless ret variable
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
dfe0ce93f2
commit
caa1b711e8
@ -3590,14 +3590,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
|
|||||||
{
|
{
|
||||||
VIR_AUTOPTR(virJSONValue) props = NULL;
|
VIR_AUTOPTR(virJSONValue) props = NULL;
|
||||||
VIR_AUTOFREE(char *) alias = NULL;
|
VIR_AUTOFREE(char *) alias = NULL;
|
||||||
int ret = -1;
|
|
||||||
int rc;
|
int rc;
|
||||||
virDomainMemoryDef mem = { 0 };
|
virDomainMemoryDef mem = { 0 };
|
||||||
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
|
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
|
||||||
cell);
|
cell);
|
||||||
|
|
||||||
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
|
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
mem.size = memsize;
|
mem.size = memsize;
|
||||||
mem.targetNode = cell;
|
mem.targetNode = cell;
|
||||||
@ -3605,16 +3604,12 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
if ((rc = qemuBuildMemoryBackendProps(&props, alias, cfg,
|
if ((rc = qemuBuildMemoryBackendProps(&props, alias, cfg,
|
||||||
priv, def, &mem, false)) < 0)
|
priv, def, &mem, false)) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (virQEMUBuildObjectCommandlineFromJSON(buf, props) < 0)
|
if (virQEMUBuildObjectCommandlineFromJSON(buf, props) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
ret = rc;
|
return rc;
|
||||||
|
|
||||||
cleanup:
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user