Skip to contentSkip to conversation

migration: Fix operator type

PATCH In review Dr. David Alan Gilbert (git) 3 participants 4 messages Apr 6, 2022 – Apr 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration: Fix operator type

From: "Dr. David Alan Gilbert" <[email protected]>

Clang spotted an & that should have been an &&; fix it.

Reported by: David Binderman / https://gitlab.com/dcb

Fixes 65dacaa04fa ("migration: introduce save_normal_page()")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963

---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +1 -1
index 3532f64ecb..0ef4bd63eb 100644
@@ -1289,7 +1289,7 @@ static int save_normal_page(RAMState *rs, RAMBlock *block, ram_addr_t offset,
                                          offset | RAM_SAVE_FLAG_PAGE));
     if (async) {
         qemu_put_buffer_async(rs->f, buf, TARGET_PAGE_SIZE,
-                              migrate_release_ram() &
+                              migrate_release_ram() &&
                               migration_in_postcopy());
     } else {
         qemu_put_buffer(rs->f, buf, TARGET_PAGE_SIZE);
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Clang spotted an & that should have been an &&; fix it.

Reported by: David Binderman / https://gitlab.com/dcb

Fixes 65dacaa04fa ("migration: introduce save_normal_page()")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963

---
 migration/ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/ram.c +0 -0
index 3532f64ecb..0ef4bd63eb 100644

migration/ram.c static int save_normal_page(RAMState *rs, RAMBlock *block, ram_addr_t offset, · line 1295

Quoted 8 lines
migration/ram.c +1 -1
@@ -1289,7 +1289,7 @@ static int save_normal_page(RAMState *rs, RAMBlock *block, ram_addr_t offset,
                                          offset | RAM_SAVE_FLAG_PAGE));
     if (async) {
         qemu_put_buffer_async(rs->f, buf, TARGET_PAGE_SIZE,
-                              migrate_release_ram() &
+                              migrate_release_ram() &&
                               migration_in_postcopy());
     } else {
         qemu_put_buffer(rs->f, buf, TARGET_PAGE_SIZE);

thanks
-- PMM

Reviewed-by on v1 1/1
#2 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 8 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Clang spotted an & that should have been an &&; fix it.

Reported by: David Binderman / https://gitlab.com/dcb

Fixes 65dacaa04fa ("migration: introduce save_normal_page()")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963

Signature · 1 line
Peter Xu
#3 lore raw
Quoted 11 lines · * Peter Xu ([email protected]) wrote:
Quoted 8 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

Clang spotted an & that should have been an &&; fix it.

Reported by: David Binderman / https://gitlab.com/dcb

Fixes 65dacaa04fa ("migration: introduce save_normal_page()")

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/963

Queued

Quoted 4 lines
Signature · 1 line
Peter Xu
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK