From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzNHB-0003BN-Qc for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:21:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzNHB-00076x-2H for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:21:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzNHA-00076p-TM for qemu-devel@nongnu.org; Thu, 19 Nov 2015 06:21:16 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 7B99014CADC for ; Thu, 19 Nov 2015 11:21:16 +0000 (UTC) From: Juan Quintela Date: Thu, 19 Nov 2015 12:20:58 +0100 Message-Id: <1447932069-2772-4-git-send-email-quintela@redhat.com> In-Reply-To: <1447932069-2772-1-git-send-email-quintela@redhat.com> References: <1447932069-2772-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PULL 03/14] Unneeded NULL check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, dgilbert@redhat.com From: "Dr. David Alan Gilbert" 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 Signed-off-by: Juan Quintela --- 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