From nobody Wed Jan 15 11:36:49 2025 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=quarantine dis=quarantine) header.from=swemel.ru Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1704897932732807.9460612241793; Wed, 10 Jan 2024 06:45:32 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 8EED71D6D; Wed, 10 Jan 2024 09:45:30 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3590C1CFB; Wed, 10 Jan 2024 09:24:31 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id A37ED1C4A; Wed, 10 Jan 2024 09:23:22 -0500 (EST) Received: from mx.swemel.ru (mx.swemel.ru [95.143.211.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8DBCB1C2F for ; Wed, 10 Jan 2024 09:21:59 -0500 (EST) 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: Dmitry Frolov To: devel@lists.libvirt.org Subject: [PATCH v4 16/19] rpc: change type to void virNetClientAddProgram() Date: Wed, 10 Jan 2024 17:21:31 +0300 Message-Id: <20240110142134.915450-17-frolov@swemel.ru> In-Reply-To: <20240110142134.915450-1-frolov@swemel.ru> References: <47d3cbc0-003b-4829-8038-8e00bbdb5c85@redhat.com> <20240110142134.915450-1-frolov@swemel.ru> MIME-Version: 1.0 Message-ID-Hash: F7WJCLBIO6PENZCMZTCOX5V55L64FMZL X-Message-ID-Hash: F7WJCLBIO6PENZCMZTCOX5V55L64FMZL X-MailFrom: frolov@swemel.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: sdl.libvirt@linuxtesting.org, Dmitry Frolov 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: 1704897934870100001 virNetClientAddProgram() returns nothing except 0. Changing return type to void. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Frolov --- src/admin/admin_remote.c | 3 +-- src/locking/lock_driver_lockd.c | 3 +-- src/logging/log_manager.c | 3 +-- src/lxc/lxc_monitor.c | 5 ++--- src/remote/remote_driver.c | 7 +++---- src/rpc/virnetclient.c | 3 +-- src/rpc/virnetclient.h | 2 +- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/admin/admin_remote.c b/src/admin/admin_remote.c index 3291a1e965..5c4913a76e 100644 --- a/src/admin/admin_remote.c +++ b/src/admin/admin_remote.c @@ -214,8 +214,7 @@ remoteAdminPrivNew(const char *sock_path) NULL, 0, NULL))) goto error; =20 - if (virNetClientAddProgram(priv->client, priv->program) < 0) - goto error; + virNetClientAddProgram(priv->client, priv->program); =20 return priv; error: diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lock= d.c index d75302dd0a..0b6c720477 100644 --- a/src/locking/lock_driver_lockd.c +++ b/src/locking/lock_driver_lockd.c @@ -213,8 +213,7 @@ static virNetClient *virLockManagerLockDaemonConnection= New(bool privileged, NULL))) goto error; =20 - if (virNetClientAddProgram(client, *prog) < 0) - goto error; + virNetClientAddProgram(client, *prog); =20 return client; =20 diff --git a/src/logging/log_manager.c b/src/logging/log_manager.c index d8490f4e5a..19e23d65c5 100644 --- a/src/logging/log_manager.c +++ b/src/logging/log_manager.c @@ -88,8 +88,7 @@ virLogManagerConnect(bool privileged, NULL))) goto error; =20 - if (virNetClientAddProgram(client, *prog) < 0) - goto error; + virNetClientAddProgram(client, *prog); =20 VIR_FREE(daemonPath); VIR_FREE(logdpath); diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c index 811d6685e5..d27e0fab3e 100644 --- a/src/lxc/lxc_monitor.c +++ b/src/lxc/lxc_monitor.c @@ -169,9 +169,8 @@ virLXCMonitor *virLXCMonitorNew(virDomainObj *vm, mon))) goto error; =20 - if (virNetClientAddProgram(mon->client, - mon->program) < 0) - goto error; + virNetClientAddProgram(mon->client, + mon->program); =20 mon->vm =3D virObjectRef(vm); memcpy(&mon->cb, cb, sizeof(mon->cb)); diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 392377deae..1ed0e54eda 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1160,10 +1160,9 @@ doRemoteOpen(virConnectPtr conn, conn))) goto error; =20 - if (virNetClientAddProgram(priv->client, priv->remoteProgram) < 0 || - virNetClientAddProgram(priv->client, priv->lxcProgram) < 0 || - virNetClientAddProgram(priv->client, priv->qemuProgram) < 0) - goto error; + virNetClientAddProgram(priv->client, priv->remoteProgram); + virNetClientAddProgram(priv->client, priv->lxcProgram); + virNetClientAddProgram(priv->client, priv->qemuProgram); =20 /* Try and authenticate with server */ VIR_DEBUG("Trying authentication"); diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 68098b1c8d..caa4960a0b 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1053,7 +1053,7 @@ bool virNetClientIsOpen(virNetClient *client) } =20 =20 -int virNetClientAddProgram(virNetClient *client, +void virNetClientAddProgram(virNetClient *client, virNetClientProgram *prog) { virObjectLock(client); @@ -1062,7 +1062,6 @@ int virNetClientAddProgram(virNetClient *client, client->programs[client->nprograms-1] =3D virObjectRef(prog); =20 virObjectUnlock(client); - return 0; } =20 =20 diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h index 1647a6cc71..7726b57ef4 100644 --- a/src/rpc/virnetclient.h +++ b/src/rpc/virnetclient.h @@ -117,7 +117,7 @@ int virNetClientDupFD(virNetClient *client, bool cloexe= c); =20 bool virNetClientHasPassFD(virNetClient *client); =20 -int virNetClientAddProgram(virNetClient *client, +void virNetClientAddProgram(virNetClient *client, virNetClientProgram *prog); =20 int virNetClientAddStream(virNetClient *client, --=20 2.34.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org