Patchwork [18/22] migration: another case of global variable assigned to local one

login
register
mail settings
Submitter Juan Quintela
Date Feb. 23, 2011, 12:44 a.m.
Message ID <5b0947b754812e29b9c907ebd7fadf1a03d4a780.1298421307.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/84034/
State New
Headers show

Comments

Juan Quintela - Feb. 23, 2011, 12:44 a.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Yoshiaki Tamura - Feb. 23, 2011, 8:54 a.m.
2011/2/23 Juan Quintela <quintela@redhat.com>:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/migration.c b/migration.c
> index accc6e4..4014330 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -136,9 +136,8 @@ void do_info_migrate(Monitor *mon, QObject **ret_data)
>     QDict *qdict;
>
>     if (current_migration) {
> -        MigrationState *s = current_migration;
>
> -        switch (s->state) {
> +        switch (current_migration->state) {
>         case MIG_STATE_NONE:
>             /* no migration has happened ever */
>             break;

Looks good to me.

Yoshi

> --
> 1.7.4
>
>
>

Patch

diff --git a/migration.c b/migration.c
index accc6e4..4014330 100644
--- a/migration.c
+++ b/migration.c
@@ -136,9 +136,8 @@  void do_info_migrate(Monitor *mon, QObject **ret_data)
     QDict *qdict;

     if (current_migration) {
-        MigrationState *s = current_migration;

-        switch (s->state) {
+        switch (current_migration->state) {
         case MIG_STATE_NONE:
             /* no migration has happened ever */
             break;