diff options
author | Blue Swirl | 2010-03-18 19:41:57 +0100 |
---|---|---|
committer | Blue Swirl | 2010-03-18 19:41:57 +0100 |
commit | 43dc2a645e00e6761a741e3d16c27c5b5a373b66 (patch) | |
tree | daf9f3fd9fa34306ac03fbb6efc72860efc879ca /hw/sm501.c | |
parent | Fix manpage errors (diff) | |
download | qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.gz qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.xz 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/sm501.c')
-rw-r--r-- | hw/sm501.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/sm501.c b/hw/sm501.c index cd1f5959ee..80185864c4 100644 --- a/hw/sm501.c +++ b/hw/sm501.c @@ -596,7 +596,7 @@ static inline uint16_t get_hwc_color(SM501State *state, int crt, int index) break; default: printf("invalid hw cursor color.\n"); - assert(0); + abort(); } switch (index) { @@ -663,7 +663,7 @@ static uint32_t sm501_system_config_read(void *opaque, target_phys_addr_t addr) default: printf("sm501 system config : not implemented register read." " addr=%x\n", (int)addr); - assert(0); + abort(); } return ret; @@ -713,7 +713,7 @@ static void sm501_system_config_write(void *opaque, default: printf("sm501 system config : not implemented register write." " addr=%x, val=%x\n", (int)addr, value); - assert(0); + abort(); } } @@ -843,7 +843,7 @@ static uint32_t sm501_disp_ctrl_read(void *opaque, target_phys_addr_t addr) default: printf("sm501 disp ctrl : not implemented register read." " addr=%x\n", (int)addr); - assert(0); + abort(); } return ret; @@ -951,7 +951,7 @@ static void sm501_disp_ctrl_write(void *opaque, default: printf("sm501 disp ctrl : not implemented register write." " addr=%x, val=%x\n", (int)addr, value); - assert(0); + abort(); } } @@ -1097,7 +1097,7 @@ static void sm501_draw_crt(SM501State * s) default: printf("sm501 draw crt : invalid DC_CRT_CONTROL=%x.\n", s->dc_crt_control); - assert(0); + abort(); break; } |