aboutsummaryrefslogtreecommitdiff
path: root/hw/pl061.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-11-09 20:04:54 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-11 12:49:53 -0600
commitb78c2b3aad2b42084265c89f93a92733d68e9003 (patch)
tree818f59109f82d0290dda40b4e6224bab402694ed /hw/pl061.c
parent35914dc7240f7d81e22219217cfa826c2c383e7b (diff)
downloadqemu-b78c2b3aad2b42084265c89f93a92733d68e9003.zip
qemu-b78c2b3aad2b42084265c89f93a92733d68e9003.tar.gz
qemu-b78c2b3aad2b42084265c89f93a92733d68e9003.tar.bz2
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 <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pl061.c')
-rw-r--r--hw/pl061.c2
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);
}