From nobody Thu May 16 03:35:18 2024 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=1655898400; cv=none; d=zohomail.com; s=zohoarc; b=F6yKxq6m0xR6EMGGPNJ/zsLp37k5FGCxzX5etIwI+ux/c8zBSF2n2t+lXJ6xJuIQiXYVTTIrGRXKH86Vr8G2BgLBeh9Al4clhrLynZOYV29Uv88zSZ62HpyEYFVvcfUD7iKOetdzqjhHw72UhBhN6/JIHjjVqPXbGopaPh1BD2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655898400; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=aGWS+cZMymobsUUcoiNc2EW1XiLDu+bjyrYD/LUGIXs=; b=T4W30fUWxiKL9Z3RbyPoi08bkTkzx/HLrj9WFaO+twwrgdepItXgmMjSFESAjxkGchPaJZungdzf74Xw0VVoV5w1LfRLf/TFiRM+cEY2BdMLgZHdtGlL1qNhNr7ulcHwh3NG3L3gQj3HYKKfe9HLcCTGI9/NAmMT8zTGmw6C/uk= 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 1655898400703819.5516560797174; Wed, 22 Jun 2022 04:46:40 -0700 (PDT) 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-142-4zAVh5WXP_6U0yWgQvf4wA-1; Wed, 22 Jun 2022 07:46:31 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B50A88316FB; Wed, 22 Jun 2022 11:46:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D217492C3B; Wed, 22 Jun 2022 11:46:29 +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 DDA05194704C; Wed, 22 Jun 2022 11:46:28 +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 AB327194704A for ; Wed, 22 Jun 2022 11:46:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6D41F2024CB7; Wed, 22 Jun 2022 11:46:27 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 149442024CB6 for ; Wed, 22 Jun 2022 11:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655898399; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aGWS+cZMymobsUUcoiNc2EW1XiLDu+bjyrYD/LUGIXs=; b=JRHYNpEyU5Ll8GZ4rmYYoehluot21AhK1YMd1methc8YIdiDx3DEM3E+eTEkd3OXRFL88E MA3okGwsbFhM56umY7VwgaaQ/x6kr59mvGhbSSoyw51i287s+oPr/r9m/GBtREVO/43eyr tdnpJDrXAxVelS6LEforJE8J8E3EoCo= X-MC-Unique: 4zAVh5WXP_6U0yWgQvf4wA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: virDomainDefParseMemory: remove pointless assignment Date: Wed, 22 Jun 2022 13:46:25 +0200 Message-Id: <26261fe48af3ceb12667191d3a0a934494308e30.1655898382.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 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 2.85 on 10.11.54.9 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1655898402435100001 Evaluate the XPath as a boolean, instead of trying to get a node out of it. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9fe930a5d8..709ca53790 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19184,7 +19184,7 @@ virDomainDefParseMemory(virDomainDef *def, } } =20 - if ((node =3D virXPathNode("./memoryBacking/nosharepages", ctxt))) + if (virXPathBoolean("boolean(./memoryBacking/nosharepages)", ctxt)) def->mem.nosharepages =3D true; =20 if (virXPathBoolean("boolean(./memoryBacking/locked)", ctxt)) --=20 2.34.1