« Previous | Next » 

Revision 6f9faa91

ID6f9faa91f5fb3a866f5bf592207c9498a017740d

Added by Stefan Weil over 12 years ago

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 <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences