From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com
Cc: pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 3/3] Unneeded NULL check
Date: Wed, 18 Nov 2015 11:48:41 +0000 [thread overview]
Message-ID: <1447847321-20132-4-git-send-email-dgilbert@redhat.com> (raw)
In-Reply-To: <1447847321-20132-1-git-send-email-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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 <dgilbert@redhat.com>
---
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
next prev parent reply other threads:[~2015-11-18 11:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 11:48 [Qemu-devel] [PATCH 0/3] [For 2.5] Migration fixes Dr. David Alan Gilbert (git)
2015-11-18 11:48 ` [Qemu-devel] [PATCH 1/3] Set last_sent_block Dr. David Alan Gilbert (git)
2015-11-18 12:02 ` Juan Quintela
2015-11-18 11:48 ` [Qemu-devel] [PATCH 2/3] migration: Dead assignment of current_time Dr. David Alan Gilbert (git)
2015-11-18 12:02 ` Juan Quintela
2015-11-18 11:48 ` Dr. David Alan Gilbert (git) [this message]
2015-11-18 12:02 ` [Qemu-devel] [PATCH 3/3] Unneeded NULL check Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447847321-20132-4-git-send-email-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=amit.shah@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.