Peter Xu <[email protected]> writes:

> It improves readability, as suggested by Markus.
>
> Suggested-by: Markus Armbruster <[email protected]>
> Signed-off-by: Peter Xu <[email protected]>
> ---
>  migration/migration.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 70813e5006..d55fde222a 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1555,12 +1555,7 @@ void migrate_error_propagate(MigrationState *s, Error 
> *error)
>  {
>      QEMU_LOCK_GUARD(&s->error_mutex);
>      trace_migrate_error(error_get_pretty(error));
> -
> -    if (!s->error) {
> -        s->error = error;
> -    } else {
> -        error_free(error);
> -    }
> +    error_propagate(&s->error, error);
>  }
>  
>  bool migrate_has_error(MigrationState *s)

Reviewed-by: Markus Armbruster <[email protected]>


Reply via email to