]> git.proxmox.com Git - qemu.git/commitdiff
hw/pl061: Remove pointless comparison of array to null
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 9 Nov 2011 20:04:54 +0000 (20:04 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 11 Nov 2011 18:49:53 +0000 (12:49 -0600)
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>
hw/pl061.c

index d13746cfe5c557593f45a104ad24ece8acc7f05b..cf5adbe1fb2f30e9cb792a2e6bdba1d42254514c 100644 (file)
@@ -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);
         }