From nobody Tue Feb 10 23:54:28 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=red-soft.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1703453822481856.2123430760944; Sun, 24 Dec 2023 13:37:02 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id CF4A81B82; Sun, 24 Dec 2023 16:37:00 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A419F1A02; Sun, 24 Dec 2023 16:35:20 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6E0F01A2F; Sun, 24 Dec 2023 16:35:06 -0500 (EST) Received: from gw.red-soft.ru (red-soft.ru [188.246.186.2]) by lists.libvirt.org (Postfix) with ESMTP id A46F91892 for ; Sun, 24 Dec 2023 16:35:03 -0500 (EST) Received: from gentoo.darknet (unknown [10.81.10.243]) by gw.red-soft.ru (Postfix) with ESMTPA id 1CBF63E1E48; Mon, 25 Dec 2023 00:26:12 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 From: Artem Chernyshev To: devel@lists.libvirt.org Subject: [PATCH 10/10] vsh: vshInitDebug() to void Date: Mon, 25 Dec 2023 00:26:03 +0300 Message-ID: <20231224212603.29506-11-artem.chernyshev@red-soft.ru> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231224212603.29506-1-artem.chernyshev@red-soft.ru> References: <20231224212603.29506-1-artem.chernyshev@red-soft.ru> MIME-Version: 1.0 X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 182326 [Dec 24 2023] X-KLMS-AntiSpam-Version: 6.1.0.3 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;red-soft.ru:7.1.1, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2023/12/24 20:51:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2023/12/24 19:18:00 #22792569 X-KLMS-AntiVirus-Status: Clean, skipped Message-ID-Hash: JXFQMXDFEVJC76JFCKOYKVR2S5HSGFZP X-Message-ID-Hash: JXFQMXDFEVJC76JFCKOYKVR2S5HSGFZP X-MailFrom: artem.chernyshev@red-soft.ru X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Artem Chernyshev X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1703453823823100001 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 --- 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; } =20 =20 @@ -3023,8 +3021,9 @@ vshInit(vshControl *ctl, const vshCmdGrp *groups, con= st vshCmdDef *set) cmdGroups =3D groups; cmdSet =3D set; =20 - if (vshInitDebug(ctl) < 0 || - (ctl->imode && vshReadlineInit(ctl) < 0)) + vshInitDebug(ctl); + + if (ctl->imode && vshReadlineInit(ctl) < 0) return false; =20 return true; @@ -3038,8 +3037,7 @@ vshInitReload(vshControl *ctl) return false; } =20 - if (vshInitDebug(ctl) < 0) - return false; + vshInitDebug(ctl); =20 if (ctl->imode) vshReadlineDeinit(ctl); --=20 2.43.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org