qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migration: current_migration is never NULL
@ 2019-06-26  0:42 Wei Yang
  2019-07-19 15:10 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yang @ 2019-06-26  0:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Wei Yang, dgilbert, quintela

migration_object_init() create and assign current_migration, which means
it will never be null until migration_shutdown().

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 migration/migration.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/migration/migration.c b/migration/migration.c
index 0fd2364961..43fd8297ef 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1667,10 +1667,6 @@ bool migration_is_idle(void)
 {
     MigrationState *s = current_migration;
 
-    if (!s) {
-        return true;
-    }
-
     switch (s->state) {
     case MIGRATION_STATUS_NONE:
     case MIGRATION_STATUS_CANCELLED:
-- 
2.19.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-20  1:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  0:42 [Qemu-devel] [PATCH] migration: current_migration is never NULL Wei Yang
2019-07-19 15:10 ` Dr. David Alan Gilbert
2019-07-20  1:37   ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).