From nobody Fri Dec 12 15:17:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1761724598; cv=none; d=zohomail.com; s=zohoarc; b=Wg7U2ObB+g9JiBIAaTl0dSlwLEvc190JvXbi/tQTnn6CGr4Qv3LlC6DyLtuxavHSIuTqHSN6/8woZz9ceu2kMn2YJa+l0npeV7GS1MuWXDtVVcIZ+q+BmFRapBnl73dvUOcQN8FPVWcqhf2oVwe3W0IqlahyBDUDVSy6dSriElI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761724598; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=90HCc4GFpWA+YUXu6UiQK2EAojiDAzdnCTMnX3h1q2A=; b=VmvPfD6FSPKM2PfFfGMKzGh9InDRjvdpZC153Zo7BmYKepuDNbeF3e0aqazW54PjpTf30teCo3nmClhyhuD5mO15DHc6RdZipRnss4osUhjFyBdCWQ/rk6IjLFARg+dweqslheD0E3LaAMspdTwK3cs7Kz3m/eE2G0XES74ZFBU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 176172459822487.16078895886358; Wed, 29 Oct 2025 00:56:38 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 972623FA68; Wed, 29 Oct 2025 03:56:35 -0400 (EDT) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id D793C41912; Wed, 29 Oct 2025 03:55:19 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 9E07341851; Wed, 29 Oct 2025 03:53:23 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7CBBE41850 for ; Wed, 29 Oct 2025 03:53:21 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-gmIf_6CyM1msZkKpZ1IrEw-1; Wed, 29 Oct 2025 03:53:19 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5624E1800654 for ; Wed, 29 Oct 2025 07:53:18 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A32231800452 for ; Wed, 29 Oct 2025 07:53:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761724400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=90HCc4GFpWA+YUXu6UiQK2EAojiDAzdnCTMnX3h1q2A=; b=AGLPStrz5kgUFMLYQeFfSig+z7SKGkTOBqqhxrPP/uauEsvGsxigF7Rnx4ULJN29Oes/kM 4erRJQteiBiZUSxcleS47+FlcFKKuQzNlP+lFppYnW2+jvZOErdEsXD01Kg00iUnrXFcW2 AOC57KH3F/7+IpqF5iQNP9HgkH4k2jU= X-MC-Unique: gmIf_6CyM1msZkKpZ1IrEw-1 X-Mimecast-MFC-AGG-ID: gmIf_6CyM1msZkKpZ1IrEw_1761724398 To: devel@lists.libvirt.org Subject: [PATCH 1/7] domain_conf: Make virDomainMemoryDefFormat() return void Date: Wed, 29 Oct 2025 08:53:01 +0100 Message-ID: <4ab2a73c057ca70e39840cdedc83b2c3459801f8.1761724370.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: qeM88Ig7FnL8CsbkqPY10urABoNOrGAbaa_g8sgyc3o_1761724398 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: W5XFHMFWQRGHI7S6AU6ZGLKC2I6DFVRE X-Message-ID-Hash: W5XFHMFWQRGHI7S6AU6ZGLKC2I6DFVRE X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1761724601684154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The only thing that's possibly making virDomainMemoryDefFormat() fail is call to virDomainMemorySourceDefFormat() but that always returns zero. Make both functions return void so callers are not confused. Signed-off-by: Michal Privoznik Reviewed-by: Jiri Denemark --- src/conf/domain_conf.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0223fc1d88..0a647a1b44 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26472,7 +26472,7 @@ virDomainCryptoDefFree(virDomainCryptoDef *def) } =20 =20 -static int +static void virDomainMemorySourceDefFormat(virBuffer *buf, virDomainMemoryDef *def) { @@ -26532,8 +26532,6 @@ virDomainMemorySourceDefFormat(virBuffer *buf, } =20 virXMLFormatElement(buf, "source", NULL, &childBuf); - - return 0; } =20 =20 @@ -26600,7 +26598,7 @@ virDomainMemoryTargetDefFormat(virBuffer *buf, virXMLFormatElement(buf, "target", &attrBuf, &childBuf); } =20 -static int +static void virDomainMemoryDefFormat(virBuffer *buf, virDomainMemoryDef *def, unsigned int flags) @@ -26625,8 +26623,7 @@ virDomainMemoryDefFormat(virBuffer *buf, virBufferAsprintf(buf, "%s\n", uuidstr); } =20 - if (virDomainMemorySourceDefFormat(buf, def) < 0) - return -1; + virDomainMemorySourceDefFormat(buf, def); =20 virDomainMemoryTargetDefFormat(buf, def, flags); =20 @@ -26634,7 +26631,6 @@ virDomainMemoryDefFormat(virBuffer *buf, =20 virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); - return 0; } =20 static void @@ -29462,8 +29458,7 @@ virDomainDefFormatInternalSetRootName(virDomainDef = *def, virDomainShmemDefFormat(buf, def->shmems[n], flags); =20 for (n =3D 0; n < def->nmems; n++) { - if (virDomainMemoryDefFormat(buf, def->mems[n], flags) < 0) - return -1; + virDomainMemoryDefFormat(buf, def->mems[n], flags); } =20 for (n =3D 0; n < def->ncryptos; n++) { --=20 2.51.0