[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/14] Unneeded NULL check
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 03/14] Unneeded NULL check |
Date: |
Thu, 19 Nov 2015 12:20:58 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
The check is unneccesary, we read the value at the start of the
thread, use it, and never change it. The value is checked to be
non-NULL before thread creation.
Spotted by coverity, CID 1339211
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 265d13a..1a42aee 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1345,7 +1345,7 @@ static void *source_return_path_thread(void *opaque)
break;
}
}
- if (rp && qemu_file_get_error(rp)) {
+ if (qemu_file_get_error(rp)) {
trace_source_return_path_thread_bad_end();
mark_source_rp_bad(ms);
}
--
2.5.0
- [Qemu-devel] [PULL 00/14] Migration pull request, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 02/14] migration: Dead assignment of current_time, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 01/14] Set last_sent_block, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 03/14] Unneeded NULL check,
Juan Quintela <=
- [Qemu-devel] [PULL 04/14] snapshot: create helper to test that block drivers supports snapshots, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 05/14] snapshot: return error code from bdrv_snapshot_delete_by_id_or_name, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 07/14] snapshot: create bdrv_all_goto_snapshot helper, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 08/14] migration: factor our snapshottability check in load_vmstate, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 06/14] snapshot: create bdrv_all_delete_snapshot helper, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 09/14] snapshot: create bdrv_all_find_snapshot helper, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 10/14] migration: drop find_vmstate_bs check in hmp_delvm, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 11/14] snapshot: create bdrv_all_create_snapshot helper, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 12/14] migration: reorder processing in hmp_savevm, Juan Quintela, 2015/11/19
- [Qemu-devel] [PULL 14/14] migration: normalize locking in migration/savevm.c, Juan Quintela, 2015/11/19