From nobody Mon Feb 9 19:07:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675351207; cv=none; d=zohomail.com; s=zohoarc; b=UmuINmAIwmDlrrhVUxCowAGn6ytVC+Fz6aBVOS4iQKofutDovQbeeKqUeIeL5ZzNHdjHSdjXunxtHkV4rXMZ+1NqAWPAUi4dW5RAwCWpVw2zTSB+Igdf00uLf9SwCs+tKYGEqZDITwmzowKk6Vr2Cot6mLAwW3OEgYA1CRm3Ht0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675351207; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7n8k5y1otzQ1WHF7GYkqB3v6NhHj4dS/u2Txe+sWAyc=; b=W4BE3dtEnjqh7gULd+68cKV6+rUq2n64gXi9VmFCfNVB8bFA2lE9/n5eMdC5mNlvDqePT3/2MRLz8BwDpMJGeNQa6v48C87kC7HrcVTrhRWEvMZMyFxiYhGJG/G4CBLVXas3EmKALTxjxyK7vi7tqrMnAchb9c/+OTdW2eddLEA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1675351207762240.7996681342065; Thu, 2 Feb 2023 07:20:07 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-44-9g41TS2-NBK8bG2xS2WzrQ-1; Thu, 02 Feb 2023 10:19:29 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A0DE80A0AE; Thu, 2 Feb 2023 15:19:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42C24404BEC2; Thu, 2 Feb 2023 15:19:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4B92F1946A5E; Thu, 2 Feb 2023 15:18:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 05E3A19465BD for ; Thu, 2 Feb 2023 15:18:14 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EA7022026D4B; Thu, 2 Feb 2023 15:18:13 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-29.brq.redhat.com [10.40.208.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 640EA2026D76 for ; Thu, 2 Feb 2023 15:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675351206; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7n8k5y1otzQ1WHF7GYkqB3v6NhHj4dS/u2Txe+sWAyc=; b=M+HGt8nRI29qmYGEaxbHEBCvTeQ1hJEPr41T5xXcy+BfKwFhLA9QZ2DHS4d1tkKjSCy5ub 8gnBpSQ5skL4CsR/A+60Y5goyQ+L8deiIFx2fJWfkXcOeRcmxhL+8pouHueUn/MyurU1Va B3UHvWH/yiobf51q1/BqnE0qXE8o94g= X-MC-Unique: 9g41TS2-NBK8bG2xS2WzrQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/7] virNetDevVPortProfileParse: Use virXMLNodeGetSubelement to find '' Date: Thu, 2 Feb 2023 16:18:05 +0100 Message-Id: <81998161e2a9646b6809f54ce583ec33a2a2468f.1675350966.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675351208566100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- src/conf/netdev_vport_profile_conf.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_p= rofile_conf.c index cdde7efcd9..26f379248f 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -36,7 +36,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int = flags) g_autofree char *virtPortProfileID =3D NULL; g_autofree char *virtPortInterfaceID =3D NULL; g_autofree virNetDevVPortProfile *virtPort =3D NULL; - xmlNodePtr cur =3D node->children; + xmlNodePtr parameters; virtPort =3D g_new0(virNetDevVPortProfile, 1); @@ -54,17 +54,13 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned in= t flags) return NULL; } - while (cur !=3D NULL) { - if (virXMLNodeNameEqual(cur, "parameters")) { - virtPortManagerID =3D virXMLPropString(cur, "managerid"); - virtPortTypeID =3D virXMLPropString(cur, "typeid"); - virtPortTypeIDVersion =3D virXMLPropString(cur, "typeidversion= "); - virtPortInstanceID =3D virXMLPropString(cur, "instanceid"); - virtPortProfileID =3D virXMLPropString(cur, "profileid"); - virtPortInterfaceID =3D virXMLPropString(cur, "interfaceid"); - break; - } - cur =3D cur->next; + if ((parameters =3D virXMLNodeGetSubelement(node, "parameters"))) { + virtPortManagerID =3D virXMLPropString(parameters, "managerid"); + virtPortTypeID =3D virXMLPropString(parameters, "typeid"); + virtPortTypeIDVersion =3D virXMLPropString(parameters, "typeidvers= ion"); + virtPortInstanceID =3D virXMLPropString(parameters, "instanceid"); + virtPortProfileID =3D virXMLPropString(parameters, "profileid"); + virtPortInterfaceID =3D virXMLPropString(parameters, "interfaceid"= ); } if (virtPortManagerID) { --=20 2.39.1