sh4: Fix potential crash in debug code
commit6f9faa91f5fb3a866f5bf592207c9498a017740d
authorStefan Weil <weil@mail.berlios.de>
Wed, 20 Jul 2011 18:56:35 +0000 (20 20:56 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fri, 2 Sep 2011 09:49:12 +0000 (2 10:49 +0100)
tree2e129bb90ef9b37f1bf237a28820cdf862e95c9e
parent625f9e1f54cd78ee98ac22030da527c9a1cc9d2b
sh4: Fix potential crash in debug code

cppcheck reports this error:

qemu/hw/sh_intc.c:390: error: Possible null pointer dereference:
 s - otherwise it is redundant to check if s is null at line 385

If s were NULL, the printf() statement would crash.
Setting braces fixes this bug.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/sh_intc.c