[libvirt PATCH 3/9] virsh: Reuse existing variable when parsing migrate --disks-port

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tools/virsh-domain.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 1f3a549d9ab0..c606900a9268 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10704,7 +10704,6 @@ doMigrate(void *opaque)
     virDomainPtr dom = NULL;
     const char *desturi = NULL;
     const char *opt = NULL;
-    int disksPort = 0;
     unsigned int flags = 0;
     virshCtrlData *data = opaque;
     vshControl *ctl = data->ctl;
@@ -10752,11 +10751,11 @@ doMigrate(void *opaque)
                                 VIR_MIGRATE_PARAM_LISTEN_ADDRESS, opt) < 0)
         goto save_error;
 
-    if (vshCommandOptInt(ctl, cmd, "disks-port", &disksPort) < 0)
+    if (vshCommandOptInt(ctl, cmd, "disks-port", &intOpt) < 0)
         goto out;
-    if (disksPort &&
+    if (intOpt &&
         virTypedParamsAddInt(&params, &nparams, &maxparams,
-                             VIR_MIGRATE_PARAM_DISKS_PORT, disksPort) < 0)
+                             VIR_MIGRATE_PARAM_DISKS_PORT, intOpt) < 0)
         goto save_error;
 
     if (vshCommandOptStringReq(ctl, cmd, "dname", &opt) < 0)
-- 
2.28.0




[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