From: Peter Maydell Date: Wed, 9 Nov 2011 20:04:54 +0000 (+0000) Subject: hw/pl061: Remove pointless comparison of array to null X-Git-Tag: qemu-xen-4.3.0-rc1~2012 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b78c2b3aad2b42084265c89f93a92733d68e9003;p=qemu-upstream-4.6-testing.git hw/pl061: Remove pointless comparison of array to null 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 Signed-off-by: Anthony Liguori --- diff --git a/hw/pl061.c b/hw/pl061.c index d13746cfe..cf5adbe1f 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); }