From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz1EG-0002hg-VN for qemu-devel@nongnu.org; Wed, 18 Nov 2015 06:48:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz1EF-0007BP-V5 for qemu-devel@nongnu.org; Wed, 18 Nov 2015 06:48:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz1EF-0007BK-QY for qemu-devel@nongnu.org; Wed, 18 Nov 2015 06:48:47 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 7C5F379 for ; Wed, 18 Nov 2015 11:48:47 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" Date: Wed, 18 Nov 2015 11:48:41 +0000 Message-Id: <1447847321-20132-4-git-send-email-dgilbert@redhat.com> In-Reply-To: <1447847321-20132-1-git-send-email-dgilbert@redhat.com> References: <1447847321-20132-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] Unneeded NULL check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com Cc: pbonzini@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 --- 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