From: Anthony Liguori <anthony@codemonkey.ws>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/pl061: Remove pointless comparison of array to null
Date: Fri, 11 Nov 2011 13:45:19 -0600 [thread overview]
Message-ID: <4EBD7B4F.7050908@codemonkey.ws> (raw)
In-Reply-To: <1320869094-10215-1-git-send-email-peter.maydell@linaro.org>
On 11/09/2011 02:04 PM, Peter Maydell wrote:
> Remove a pointless comparison of an array to null. (There is
> no need to check whether s->out[i] is non-null as qemu_set_irq
> will do that for us.) Spotted by Coverity (see bug 887883).
>
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/pl061.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/pl061.c b/hw/pl061.c
> index d13746c..cf5adbe 100644
> --- a/hw/pl061.c
> +++ b/hw/pl061.c
> @@ -103,7 +103,7 @@ static void pl061_update(pl061_state *s)
> s->old_data = out;
> for (i = 0; i< 8; i++) {
> mask = 1<< i;
> - if ((changed& mask)&& s->out) {
> + if (changed& mask) {
> DPRINTF("Set output %d = %d\n", i, (out& mask) != 0);
> qemu_set_irq(s->out[i], (out& mask) != 0);
> }
prev parent reply other threads:[~2011-11-11 19:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 20:04 [Qemu-devel] [PATCH] hw/pl061: Remove pointless comparison of array to null Peter Maydell
2011-11-11 19:45 ` Anthony Liguori [this message]
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=4EBD7B4F.7050908@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.