From nobody Mon Feb 9 05:19:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1642011105; cv=none; d=zohomail.com; s=zohoarc; b=KmArOpOuFU4/nYUzUYpEcK2FWZQo+Eda1zEaMFBz8jXY4FX7oSFjdhgpeC4ji8X9V1dPc9EAfZaD20SknlFajDvZ1bo0Rg43YbWlCG8XrpI/3vwSdOVO1gH57d4K9QXYDbRZI2hX3P0qXw0+Gqw8RwgfkbBvkFGb6/h9CsinqaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642011105; 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=repU4Y2Ph3VqQpzWHz3+KrxSjR7i2SgTKeMm70soThg=; b=JODMbxSasa8Ma48Jp9SGFqkJsnCXBUDyEUQ9j2r/nFHDhtjhvKpS9+Cb4sZFeQ+1ldNOn51vxN1v0NN83izzs7LcbG+qMx0WMpGCqEjQPm22BGbus9dTDLtMXJ9h3IZBwRbCqooMJOHOWGYwo61+/OOOBgLliyiUhhJgP6UKDYg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1642011105155255.74498944400034; Wed, 12 Jan 2022 10:11:45 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-65-UNf5OHM2NZeF4xl7AM-61w-1; Wed, 12 Jan 2022 13:11:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 26F70100C694; Wed, 12 Jan 2022 18:11:34 +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 03C197DE58; Wed, 12 Jan 2022 18:11:34 +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 C3ADC4A707; Wed, 12 Jan 2022 18:11:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20CIAddK003099 for ; Wed, 12 Jan 2022 13:10:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id CF0E38CB1D; Wed, 12 Jan 2022 18:10:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CCD08AD18 for ; Wed, 12 Jan 2022 18:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642011104; 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=repU4Y2Ph3VqQpzWHz3+KrxSjR7i2SgTKeMm70soThg=; b=TjRKViDp5Xy3lhMmRtc34RSVz/lcZSBkKRlMY/WwyxzPN+Y6C9/X1GYXDzehYXzDfG/6LA WHUN2Ttj5WfKOpDxbYyRsu0b3hI/+85t3YtZ/haN9rhFId240ilsRkngSvk4fEIzFmI/E/ GCCUdHkmkSdJvW1ut8S6RxtHpKK8wjk= X-MC-Unique: UNf5OHM2NZeF4xl7AM-61w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/17] virDomainSnapshotRedefinePrep: Use 'snapdef' for snapshot definition object Date: Wed, 12 Jan 2022 19:10:10 +0100 Message-Id: <8e5fed03c4225c614538b275a379f1406fc8d6b6.1642010887.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.16 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: 1642011106287100001 Content-Type: text/plain; charset="utf-8" We use this variable name to distinguish it from the domain definition. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 1d61f93b65..4d2cfae128 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -980,23 +980,23 @@ virDomainSnapshotRedefinePrep(virDomainObj *vm, virDomainXMLOption *xmlopt, unsigned int flags) { - virDomainSnapshotDef *def =3D *defptr; + virDomainSnapshotDef *snapdef =3D *defptr; virDomainMomentObj *other; virDomainSnapshotDef *otherdef =3D NULL; bool check_if_stolen; - if (virDomainSnapshotCheckCycles(vm->snapshots, def, vm->def->name) < = 0) + if (virDomainSnapshotCheckCycles(vm->snapshots, snapdef, vm->def->name= ) < 0) return -1; - other =3D virDomainSnapshotFindByName(vm->snapshots, def->parent.name); + other =3D virDomainSnapshotFindByName(vm->snapshots, snapdef->parent.n= ame); if (other) otherdef =3D virDomainSnapshotObjGetDef(other); check_if_stolen =3D other && otherdef->parent.dom; - if (virDomainSnapshotRedefineValidate(def, vm->def->uuid, other, xmlop= t, + if (virDomainSnapshotRedefineValidate(snapdef, vm->def->uuid, other, x= mlopt, flags) < 0) { /* revert any stealing of the snapshot domain definition */ - if (check_if_stolen && def->parent.dom && !otherdef->parent.dom) - otherdef->parent.dom =3D g_steal_pointer(&def->parent.dom); + if (check_if_stolen && snapdef->parent.dom && !otherdef->parent.do= m) + otherdef->parent.dom =3D g_steal_pointer(&snapdef->parent.dom); return -1; } if (other) { --=20 2.31.1