提交 25174055 编写于 作者: P Peter Maydell 提交者: Michael Tokarev

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: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 5a1de0b3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册