vshInitDebug() function returns an
invariant result, so turn it to void. Remove all
redundant checks which depends on its returning value

Fixes: 26a137093b ("tools: Use g_strdup_printf() instead of virAsprintf()")
Signed-off-by: Artem Chernyshev <artem.chernys...@red-soft.ru>
---
 tools/vsh.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/tools/vsh.c b/tools/vsh.c
index 6b6a677b47..2304037d09 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -2967,7 +2967,7 @@ vshReadlineHistoryAdd(const char *cmd G_GNUC_UNUSED)
 /*
  * Initialize debug settings.
  */
-static int
+static void
 vshInitDebug(vshControl *ctl)
 {
     const char *debugEnv;
@@ -2999,8 +2999,6 @@ vshInitDebug(vshControl *ctl)
             vshOpenLogFile(ctl);
         }
     }
-
-    return 0;
 }
 
 
@@ -3023,8 +3021,9 @@ vshInit(vshControl *ctl, const vshCmdGrp *groups, const 
vshCmdDef *set)
     cmdGroups = groups;
     cmdSet = set;
 
-    if (vshInitDebug(ctl) < 0 ||
-        (ctl->imode && vshReadlineInit(ctl) < 0))
+    vshInitDebug(ctl);
+
+    if (ctl->imode && vshReadlineInit(ctl) < 0)
         return false;
 
     return true;
@@ -3038,8 +3037,7 @@ vshInitReload(vshControl *ctl)
         return false;
     }
 
-    if (vshInitDebug(ctl) < 0)
-        return false;
+    vshInitDebug(ctl);
 
     if (ctl->imode)
         vshReadlineDeinit(ctl);
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to