From nobody Sun Feb 8 13:28:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1626255944; cv=none; d=zohomail.com; s=zohoarc; b=iEE/iS/qKQZDfjl7Ydyz85cJxkcQFVTWKbqLoJYL5ZAUGVJ8fEdfuA2zxSYmt7Yg3fHUIHyKSEXgXCUwi6RX9VLy4o8M6zrLfLAHYQNVvyH8/3dV7b/VhZ96Pt5nuFmkXAhb2CjK6CPnvn2F+uAiP2JVhNzttKnej8koI0KTSsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626255944; h=Content-Type:Content-Transfer-Encoding:Cc: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=QH7qlvpM/d5Fsb2uCulKXwQkKE3sQvsx3A7iWZGcqe0=; b=DUVoyLSiT863+17OKI7X1sZ373MQZKbOr2B9vPFCzby1g8AWFMHKz6HMFW8b7MW6bBSYz1+DMWasKnoF6ha+2+Pj5INeEWhcfUXiXMABhlrYhC3Y7ToW+7zwcNebseBL2INQRvNwRYNsA2y25KtbE6TOEgBXhjTFLTzv+/OXAPE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626255944655545.734995644144; Wed, 14 Jul 2021 02:45:44 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-GfZd8sXiMCC1DP4ErHMl6w-1; Wed, 14 Jul 2021 05:45:42 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AF7AB19057A4; Wed, 14 Jul 2021 09:45:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8A4AF1001281; Wed, 14 Jul 2021 09:45:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3E67B4EA39; Wed, 14 Jul 2021 09:45:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16E9jIl7001721 for ; Wed, 14 Jul 2021 05:45:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 78E8D5D741; Wed, 14 Jul 2021 09:45:18 +0000 (UTC) Received: from work.redhat.com (ovpn-113-156.ams2.redhat.com [10.36.113.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1A985D719; Wed, 14 Jul 2021 09:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626255943; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=QH7qlvpM/d5Fsb2uCulKXwQkKE3sQvsx3A7iWZGcqe0=; b=Lo+Fq4NtEQINz4Qk00eED6CytUbypWvAyZSDs5xpgdmxNgNhNz23x8R4hCmDPwWvmT/KQR UswJp0TpVYppv+mca1dXheA80ordq3JJqr3b/3fSXsxKE9/MkcpNYQGsu1CGI/YIv4c9Md EObTCPt+Lh9Uj7oUeirmhN+9Z/0JMFU= X-MC-Unique: GfZd8sXiMCC1DP4ErHMl6w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] virNWFilterParseParamAttributes: Iterate over "element" children Date: Wed, 14 Jul 2021 11:44:50 +0200 Message-Id: <20210714094457.61612-4-twiederh@redhat.com> In-Reply-To: <20210714094457.61612-1-twiederh@redhat.com> References: <20210714094457.61612-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1626255945689100001 Content-Type: text/plain; charset="utf-8" "xmlNextElementSibling()" skips attribute nodes, making the explicit check for the type of `cur` redundant. This prepares for the removal of this check in the next commit. Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index c94e9679f8..3754cec55f 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -703,7 +703,7 @@ virNWFilterParseParamAttributes(xmlNodePtr cur) =20 GHashTable *table =3D virHashNew(virNWFilterVarValueHashFree); =20 - cur =3D cur->children; + cur =3D xmlFirstElementChild(cur); =20 while (cur !=3D NULL) { if (cur->type =3D=3D XML_ELEMENT_NODE) { @@ -739,7 +739,7 @@ virNWFilterParseParamAttributes(xmlNodePtr cur) VIR_FREE(val); } } - cur =3D cur->next; + cur =3D xmlNextElementSibling(cur); } return table; =20 --=20 2.31.1