29b115
From 4bd48e784ae0c38c89f1a944b06c997fd28c4d37 Mon Sep 17 00:00:00 2001
29b115
From: Miroslav Rezanina <mrezanin@redhat.com>
29b115
Date: Thu, 19 May 2022 04:15:33 -0400
29b115
Subject: [PATCH 16/16] migration: Fix operator type
29b115
MIME-Version: 1.0
29b115
Content-Type: text/plain; charset=UTF-8
29b115
Content-Transfer-Encoding: 8bit
29b115
29b115
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
29b115
RH-MergeRequest: 92: Fix build using clang 14
29b115
RH-Commit: [1/1] ad9980e64cf2e39085d68f1ff601444bf2afe228 (mrezanin/centos-src-qemu-kvm)
29b115
RH-Bugzilla: 2064530
29b115
RH-Acked-by: Daniel P. Berrangé <berrange@redhat.com>
29b115
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
29b115
29b115
Clang spotted an & that should have been an &&; fix it.
29b115
29b115
Reported by: David Binderman / https://gitlab.com/dcb
29b115
Fixes: 65dacaa04fa ("migration: introduce save_normal_page()")
29b115
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963
29b115
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
29b115
Message-Id: <20220406102515.96320-1-dgilbert@redhat.com>
29b115
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
29b115
Reviewed-by: Peter Xu <peterx@redhat.com>
29b115
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
29b115
(cherry picked from commit f912ec5b2d65644116ff496b58d7c9145c19e4c0)
29b115
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
29b115
---
29b115
 migration/ram.c | 2 +-
29b115
 1 file changed, 1 insertion(+), 1 deletion(-)
29b115
29b115
diff --git a/migration/ram.c b/migration/ram.c
29b115
index 3532f64ecb..0ef4bd63eb 100644
29b115
--- a/migration/ram.c
29b115
+++ b/migration/ram.c
29b115
@@ -1289,7 +1289,7 @@ static int save_normal_page(RAMState *rs, RAMBlock *block, ram_addr_t offset,
29b115
                                          offset | RAM_SAVE_FLAG_PAGE));
29b115
     if (async) {
29b115
         qemu_put_buffer_async(rs->f, buf, TARGET_PAGE_SIZE,
29b115
-                              migrate_release_ram() &
29b115
+                              migrate_release_ram() &&
29b115
                               migration_in_postcopy());
29b115
     } else {
29b115
         qemu_put_buffer(rs->f, buf, TARGET_PAGE_SIZE);
29b115
-- 
29b115
2.31.1
29b115