mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemuBuildMemoryBackendProps: use 'rc' instead of ret.
Do not overwrite the 'ret' value more than once. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
77de0d36df
commit
dfe0ce93f2
@ -3333,7 +3333,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
|
|||||||
VIR_AUTOFREE(char *) memPath = NULL;
|
VIR_AUTOFREE(char *) memPath = NULL;
|
||||||
bool prealloc = false;
|
bool prealloc = false;
|
||||||
virBitmapPtr nodemask = NULL;
|
virBitmapPtr nodemask = NULL;
|
||||||
int ret = -1;
|
int rc;
|
||||||
VIR_AUTOPTR(virJSONValue) props = NULL;
|
VIR_AUTOPTR(virJSONValue) props = NULL;
|
||||||
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, mem->targetNode);
|
bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, mem->targetNode);
|
||||||
unsigned long long pagesize = mem->pagesize;
|
unsigned long long pagesize = mem->pagesize;
|
||||||
@ -3547,7 +3547,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
|
|||||||
!force) {
|
!force) {
|
||||||
/* report back that using the new backend is not necessary
|
/* report back that using the new backend is not necessary
|
||||||
* to achieve the desired configuration */
|
* to achieve the desired configuration */
|
||||||
ret = 1;
|
rc = 1;
|
||||||
} else {
|
} else {
|
||||||
/* otherwise check the required capability */
|
/* otherwise check the required capability */
|
||||||
if (STREQ(backendType, "memory-backend-file") &&
|
if (STREQ(backendType, "memory-backend-file") &&
|
||||||
@ -3570,14 +3570,14 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
rc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*backendProps = qemuMonitorCreateObjectPropsWrap(backendType, alias,
|
if (!(*backendProps = qemuMonitorCreateObjectPropsWrap(backendType, alias,
|
||||||
&props)))
|
&props)))
|
||||||
ret = -1;
|
return -1;
|
||||||
|
|
||||||
return ret;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user