From: Ján Tomko Date: Mon, 26 Aug 2019 20:38:51 +0000 (+0200) Subject: qemuBuildMemoryCellBackendStr: remove useless ret variable X-Git-Tag: v5.8.0-rc1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caa1b711e8e8946dbd237214ff919adcd9ce3594;p=thirdparty%2Flibvirt.git qemuBuildMemoryCellBackendStr: remove useless ret variable Signed-off-by: Ján Tomko Reviewed-by: Cole Robinson --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index df499f75e3..90e090c72e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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; }