hyperv: Remove unnecessary hash table size query.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Jonathon Jongsma committed 2026-03-23 09:20:42 -05:00
1 parent 85fdb72ac0
commit 95d29b66b4
1 file changed
+2 -3
+2 -3
View File
@@ -548,7 +548,7 @@ hypervSerializeEmbeddedParam(hypervParam *p, const char *resourceUri,
hypervWmiClassInfo *classInfo = p->embedded.info;
g_autofree virHashKeyValuePair *items = NULL;
hypervCimType *property = NULL;
ssize_t numKeys = -1;
size_t numKeys = 0;
int len = 0, i = 0;
if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, p->embedded.name,
@@ -582,8 +582,7 @@ hypervSerializeEmbeddedParam(hypervParam *p, const char *resourceUri,
}
/* retrieve parameters out of hash table */
numKeys = virHashSize(p->embedded.table);
items = virHashGetItems(p->embedded.table, NULL, false);
items = virHashGetItems(p->embedded.table, &numKeys, false);
if (!items) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not read embedded param hash table"));