fixup /ˈfɪksʌp/
n. the next best thing after getting it right the first time
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
tools/virsh-domain.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index d06c24cc74..e985090992 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -6970,7 +6970,6 @@ cmdVcpuPin(vshControl *ctl, const vshCmd *cmd)
g_autoptr(virshDomain) dom = NULL;
unsigned int vcpu = 0;
const char *cpulist = NULL;
- bool ret = false;
g_autofree unsigned char *cpumap = NULL;
int cpumaplen;
int maxcpu;
@@ -7012,8 +7011,7 @@ cmdVcpuPin(vshControl *ctl, const vshCmd *cmd)
/* Query mode: show CPU affinity information then exit.*/
if (!cpulist) {
- ret = virshVcpuPinQuery(ctl, dom, vcpu, got_vcpu, maxcpu, flags);
- return false;
+ return virshVcpuPinQuery(ctl, dom, vcpu, got_vcpu, maxcpu, flags);
}
/* Pin mode: pinning specified vcpu to specified physical cpus */
@@ -7063,7 +7061,6 @@ cmdEmulatorPin(vshControl *ctl, const vshCmd *cmd)
{
g_autoptr(virshDomain) dom = NULL;
const char *cpulist = NULL;
- bool ret = false;
g_autofree unsigned char *cpumap = NULL;
int cpumaplen;
int maxcpu;
@@ -7099,6 +7096,8 @@ cmdEmulatorPin(vshControl *ctl, const vshCmd *cmd)
/* Query mode: show CPU affinity information then exit.*/
if (query) {
+ bool ret = false;
+
/* When query mode and neither "live", "config" nor
"current"
* is specified, set VIR_DOMAIN_AFFECT_CURRENT as flags */
if (flags == -1)
@@ -7114,7 +7113,7 @@ cmdEmulatorPin(vshControl *ctl, const vshCmd *cmd)
ret = virshPrintPinInfo(ctl, cpumap, cpumaplen);
vshPrint(ctl, "\n");
}
- return false;
+ return ret;
}
/* Pin mode: pinning emulator threads to specified physical cpus */
--
2.31.1