diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-03-18 18:41:57 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-03-18 18:41:57 +0000 |
commit | 43dc2a645e00e6761a741e3d16c27c5b5a373b66 (patch) | |
tree | daf9f3fd9fa34306ac03fbb6efc72860efc879ca /hw/sh_serial.c | |
parent | 609c1daced7f444f9f6569bba72d6a56a697ac95 (diff) | |
download | qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.zip |
Replace assert(0) with abort() or cpu_abort()
When building with -DNDEBUG, assert(0) will not stop execution
so it must not be used for abnormal termination.
Use cpu_abort() when in CPU context, abort() otherwise.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sh_serial.c')
-rw-r--r-- | hw/sh_serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sh_serial.c b/hw/sh_serial.c index 2447b919b8..93dc144a34 100644 --- a/hw/sh_serial.c +++ b/hw/sh_serial.c @@ -182,7 +182,7 @@ static void sh_serial_ioport_write(void *opaque, uint32_t offs, uint32_t val) } fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n", offs); - assert(0); + abort(); } static uint32_t sh_serial_ioport_read(void *opaque, uint32_t offs) @@ -282,7 +282,7 @@ static uint32_t sh_serial_ioport_read(void *opaque, uint32_t offs) if (ret & ~((1 << 16) - 1)) { fprintf(stderr, "sh_serial: unsupported read from 0x%02x\n", offs); - assert(0); + abort(); } return ret; |