Received: from eggs.gnu.org ([140.186.70.92]:38372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROEOI-00060o-L7 for qemu-devel@nongnu.org; Wed, 09 Nov 2011 15:04:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROEOH-0004jr-IT for qemu-devel@nongnu.org; Wed, 09 Nov 2011 15:04:58 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:59540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROEOH-0004jk-B3 for qemu-devel@nongnu.org; Wed, 09 Nov 2011 15:04:57 -0500 From: Peter Maydell Date: Wed, 9 Nov 2011 20:04:54 +0000 Message-Id: <1320869094-10215-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] hw/pl061: Remove pointless comparison of array to null List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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 --- 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); } -- 1.7.1