[libvirt PATCH 13/12] fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fixup /ˈfɪksʌp/
n. the next best thing after getting it right the first time

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux