From nobody Tue Feb 10 04:13:44 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; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com 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 1636621934640248.1998095659144; Thu, 11 Nov 2021 01:12:14 -0800 (PST) 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-524-G_59KZ4mP4ugsa7TRaEgVw-1; Thu, 11 Nov 2021 04:12:10 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79241871254; Thu, 11 Nov 2021 09:12:04 +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 466C61973B; Thu, 11 Nov 2021 09:12:04 +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 290AE4A703; Thu, 11 Nov 2021 09:12:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AB9BxQ4027424 for ; Thu, 11 Nov 2021 04:11:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8F2B951E3; Thu, 11 Nov 2021 09:11:59 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 89C8051E2 for ; Thu, 11 Nov 2021 09:11:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4412811E7F for ; Thu, 11 Nov 2021 09:11:56 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-ezB4EA7CPB2tFj1KJcCBgQ-1; Thu, 11 Nov 2021 04:11:54 -0500 Received: from [10.28.15.237] (helo=vz8.sw.ru) by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1ml5sB-008xIO-G8 for libvir-list@redhat.com; Thu, 11 Nov 2021 11:55:55 +0300 X-MC-Unique: G_59KZ4mP4ugsa7TRaEgVw-1 X-MC-Unique: ezB4EA7CPB2tFj1KJcCBgQ-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH 3/9] qemu: don't bother saving ret code from qemuDomainSaveMemory Date: Thu, 11 Nov 2021 11:55:48 +0300 Message-Id: <20211111085554.14685-4-nshirokovskiy@virtuozzo.com> In-Reply-To: <20211111085554.14685-1-nshirokovskiy@virtuozzo.com> References: <20211111085554.14685-1-nshirokovskiy@virtuozzo.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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.84 on 10.5.11.23 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-ZM-MESSAGEID: 1636621936195100001 Content-Type: text/plain; charset="utf-8" It does not make a difference. qemuDomainSaveMemory ret code is either 0 or -1. If it is -1 then ret is already set to -1. If it is 0 then it is overwritten by qemuSnapshotCreateActiveExternalDisks anyway. Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_snapshot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index aa9b2ebbd9..8656affa25 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1451,9 +1451,9 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *drive= r, =20 memory_existing =3D virFileExists(snapdef->memorysnapshotfile); =20 - if ((ret =3D qemuSaveImageCreate(driver, vm, snapdef->memorysnapsh= otfile, - data, compressor, 0, - QEMU_ASYNC_JOB_SNAPSHOT)) < 0) + if (qemuSaveImageCreate(driver, vm, snapdef->memorysnapshotfile, + data, compressor, 0, + QEMU_ASYNC_JOB_SNAPSHOT) < 0) goto cleanup; =20 /* the memory image was created, remove it on errors */ --=20 2.27.0