From nobody Mon Mar 23 23:25:47 2026 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=1774041640; cv=none; d=zohomail.com; s=zohoarc; b=boHWHYvm9w4557RFuvFiLAypfyjzD4IMbBb21NqsUftDdq9oWmaSWOMv/kKwFf8uXXK4qeDcX7urQbl1wmcp3GfKv35Pg+jX1uaAQkbuCVh7FPwUcbGLBbYJ0L+fgboloZ7xDEby5+PfHyMAIYmddbcTCG7yXwWpiilFaCQnlPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774041640; 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=YbDG6YwS1rDLSGnaYmBD4b5imATknurIHL7SKaYotH0=; b=hF9QOJPEY6bMqpUKYkcQ7MyxKJUIkio/BsrCiwHt8PGHaLHY/L3V63xw8+4NLWZgrkrSFULoO65kNRpwkB7cBtcw1D22N6xOMBhq17gdRVCOe7nTeto5bO22oW0ueejJJXmoJvWH+4wW+x35NgynFH3bSgT1J5LcQxswlhaxqhg= 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 1774041640401218.98541141602686; Fri, 20 Mar 2026 14:20:40 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7F54241A86; Fri, 20 Mar 2026 17:20:39 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 2257941B4A; Fri, 20 Mar 2026 17:19:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DB5463F309; Fri, 20 Mar 2026 17:19:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 7C2B23F942 for ; Fri, 20 Mar 2026 17:19:28 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-93NMm0QqNkGCRK4wNgqABQ-1; Fri, 20 Mar 2026 17:19:26 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CC89D19560AB for ; Fri, 20 Mar 2026 21:19:25 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.65.240]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 67F001955F21 for ; Fri, 20 Mar 2026 21:19:25 +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=-2.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1774041568; 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=YbDG6YwS1rDLSGnaYmBD4b5imATknurIHL7SKaYotH0=; b=J8DFtjOsdK6S0XBptZ8VKaNXvGxicmzQEAbfv9kyXKjEn6GTLy5Bf3MvyEB4hD0vI2AAn1 I6B/jzM5KNT8ZlKTInXKV2+GxfSbSvYQcQDtEmmBOrfyAdKRU8I63kbJFz/g5dPp2CrXoc WmArJPn6F4AXxwMZN76P4Ubpg4d3Qyw= X-MC-Unique: 93NMm0QqNkGCRK4wNgqABQ-1 X-Mimecast-MFC-AGG-ID: 93NMm0QqNkGCRK4wNgqABQ_1774041566 To: devel@lists.libvirt.org Subject: [PATCH v2 1/2] hyperv: use constants for xml namespaces Date: Fri, 20 Mar 2026 16:19:22 -0500 Message-ID: <20260320211923.2252983-2-jjongsma@redhat.com> In-Reply-To: <20260320211923.2252983-1-jjongsma@redhat.com> References: <20260320211923.2252983-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7wvJkVQgX-EwsTuERZWQbXhTEZIzovO323oZNMLYpy0_1774041566 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LK7QO5OWBG5FCJOA76JPSUQ2Q6PZMQA7 X-Message-ID-Hash: LK7QO5OWBG5FCJOA76JPSUQ2Q6PZMQA7 X-MailFrom: jjongsma@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: Jonathon Jongsma via Devel Reply-To: Jonathon Jongsma X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1774041642384158500 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/hyperv/hyperv_wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index dab7abe8cf..14df670fa1 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -513,13 +513,13 @@ hypervSerializeEprParam(hypervParam *p, hypervPrivate= *priv, return -1; } =20 - if (!ws_xml_ns_add(xmlNodeParam, "http://schemas.xmlsoap.org/ws/2004/0= 8/addressing", "a")) { + if (!ws_xml_ns_add(xmlNodeParam, XML_NS_ADDRESSING, "a")) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not set namespace address for xmlNodeParam= ")); return -1; } =20 - if (!ws_xml_ns_add(xmlNodeParam, "http://schemas.dmtf.org/wbem/wsman/1= /wsman.xsd", "w")) { + if (!ws_xml_ns_add(xmlNodeParam, XML_NS_WS_MAN, "w")) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not set wsman namespace address for xmlNod= eParam")); return -1; --=20 2.53.0 From nobody Mon Mar 23 23:25:47 2026 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=1774041673; cv=none; d=zohomail.com; s=zohoarc; b=ammz+Bz2Uf4bl4WwAJMWJ5Bm3lGOgBR9kLWHEYPCUvhNTgeTv/WnnJHUZLBf/dXNFQ2r5yFoJFZ/KTvND3wFhXHqte1/M9GNZE0oFhazezhfzphm1cgkjL4f5o3zNgxhqG/r1JKjSADrU5c0GNg2TUxgC2bZ5LR3k0T7EYScHuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774041673; 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=zEpx9CXUoOYgMLIv4H83sybyoTFB64qmWKISXtWjduk=; b=YqjN5raa3mgLxlnZcDed7ra3IbI8SgP2J445c1+u1Z3z7DWwzCzEby9yIgvDSV4hKQa4UPCkUNvTQgQ5hiF7XFzgWDhce/27580VMdeSJUbWHDQNTzHOcLbD73prEnOMAVYDkYLo55s1CMe2DoEUCgziSNAhfiLzNQcCFQEGciQ= 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 1774041673850320.78623292494683; Fri, 20 Mar 2026 14:21:13 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id CE52E418AB; Fri, 20 Mar 2026 17:21:12 -0400 (EDT) Received: from [172.19.199.12] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C83B841B9C; Fri, 20 Mar 2026 17:19:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 893483F942; Fri, 20 Mar 2026 17:19:30 -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 16CC63F309 for ; Fri, 20 Mar 2026 17:19:30 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-Z4c9VRh8PTGxJqJksvSpmg-1; Fri, 20 Mar 2026 17:19:27 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8DDEE19560AA for ; Fri, 20 Mar 2026 21:19:26 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.65.240]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 28B931955F21 for ; Fri, 20 Mar 2026 21:19:25 +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=-2.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1774041569; 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=zEpx9CXUoOYgMLIv4H83sybyoTFB64qmWKISXtWjduk=; b=P04iTHWoxAXn+o0mlZEEBFIXnzw6KMSXoToCQfvXu+9yzEx8gPdUmE8drR61g4Mm2gZY+8 o3l1xj4+yum/ij/F2EInZUTPKP6/NO+hGGLo9J+oPLTh4nAig263iOa0v8R02nHqdwmSqn P7cKANmGXvXYyQ+5KZdwyVqkSw0LmlY= X-MC-Unique: Z4c9VRh8PTGxJqJksvSpmg-1 X-Mimecast-MFC-AGG-ID: Z4c9VRh8PTGxJqJksvSpmg_1774041566 To: devel@lists.libvirt.org Subject: [PATCH v2 2/2] hyperv: Remove unnecessary hash table size query. Date: Fri, 20 Mar 2026 16:19:23 -0500 Message-ID: <20260320211923.2252983-3-jjongsma@redhat.com> In-Reply-To: <20260320211923.2252983-1-jjongsma@redhat.com> References: <20260320211923.2252983-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: npvjlDA5IH7UNiP2M8o0tEt_N1A0BUQ4gl8LzNQqtG4_1774041566 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: E7HNG7D3LUJNJQRY2ILG6WSD76E4O5HZ X-Message-ID-Hash: E7HNG7D3LUJNJQRY2ILG6WSD76E4O5HZ X-MailFrom: jjongsma@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: Jonathon Jongsma via Devel Reply-To: Jonathon Jongsma X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1774041675720154100 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/hyperv/hyperv_wmi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 14df670fa1..3e161429d5 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -548,7 +548,7 @@ hypervSerializeEmbeddedParam(hypervParam *p, const char= *resourceUri, hypervWmiClassInfo *classInfo =3D p->embedded.info; g_autofree virHashKeyValuePair *items =3D NULL; hypervCimType *property =3D NULL; - ssize_t numKeys =3D -1; + size_t numKeys =3D 0; int len =3D 0, i =3D 0; =20 if (!(xmlNodeParam =3D ws_xml_add_child(*methodNode, resourceUri, p->e= mbedded.name, @@ -582,8 +582,7 @@ hypervSerializeEmbeddedParam(hypervParam *p, const char= *resourceUri, } =20 /* retrieve parameters out of hash table */ - numKeys =3D virHashSize(p->embedded.table); - items =3D virHashGetItems(p->embedded.table, NULL, false); + items =3D virHashGetItems(p->embedded.table, &numKeys, false); if (!items) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not read embedded param hash table")); --=20 2.53.0