diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-21 18:41:45 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2016-10-28 18:17:23 +0300 |
commit | 25174055f428254427e7541139037eb9a34fc109 (patch) | |
tree | 8969b5791979b869e91b9fc5794cdfa470ea5dd1 /migration/migration.c | |
parent | 5a1de0b325c9c3df41cb41bcea8dca5fafc67b9a (diff) | |
download | qemu-25174055f428254427e7541139037eb9a34fc109.zip qemu-25174055f428254427e7541139037eb9a34fc109.tar.gz qemu-25174055f428254427e7541139037eb9a34fc109.tar.bz2 |
migration: Remove unneeded NULL check from migrate_fd_error()
All the callers of migrate_fd_error() pass a non-NULL
error parameter, and if any did pass NULL then we would
segfault in error_copy(), so remove the unnecessary
NULL check earlier in the function.
(Spotted by Coverity.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 4d417b7..d216b93 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -922,7 +922,7 @@ static void migrate_fd_cleanup(void *opaque) void migrate_fd_error(MigrationState *s, const Error *error) { - trace_migrate_fd_error(error ? error_get_pretty(error) : ""); + trace_migrate_fd_error(error_get_pretty(error)); assert(s->to_dst_file == NULL); migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED); |