[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] migration/ram: Fix compilation with -Wshadow=local
From: |
Thomas Huth |
Subject: |
[PATCH] migration/ram: Fix compilation with -Wshadow=local |
Date: |
Mon, 23 Oct 2023 16:50:44 +0200 |
No need for a new variable here, especially not for one that shadows
a variable from the beginning of the function scope. With this change
the code now successfully compiles with -Wshadow=local.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
migration/ram.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 92769902bb..9de9e54fa9 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3238,8 +3238,7 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
ram_flush_compressed_data(rs);
- int ret = rdma_registration_stop(f, RAM_CONTROL_FINISH);
- if (ret < 0) {
+ if (rdma_registration_stop(f, RAM_CONTROL_FINISH) < 0) {
qemu_file_set_error(f, ret);
}
}
--
2.41.0
- [PATCH] migration/ram: Fix compilation with -Wshadow=local,
Thomas Huth <=