aboutsummaryrefslogtreecommitdiff
path: root/hw/sh_intc.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-18 18:41:57 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-18 18:41:57 +0000
commit43dc2a645e00e6761a741e3d16c27c5b5a373b66 (patch)
treedaf9f3fd9fa34306ac03fbb6efc72860efc879ca /hw/sh_intc.c
parent609c1daced7f444f9f6569bba72d6a56a697ac95 (diff)
downloadqemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.zip
qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.gz
qemu-43dc2a645e00e6761a741e3d16c27c5b5a373b66.tar.bz2
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_intc.c')
-rw-r--r--hw/sh_intc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/sh_intc.c b/hw/sh_intc.c
index b6f45f0..da36d32 100644
--- a/hw/sh_intc.c
+++ b/hw/sh_intc.c
@@ -105,7 +105,7 @@ int sh_intc_get_pending_vector(struct intc_desc *desc, int imask)
}
}
- assert(0);
+ abort();
}
#define INTC_MODE_NONE 0
@@ -181,7 +181,7 @@ static void sh_intc_locate(struct intc_desc *desc,
}
}
- assert(0);
+ abort();
}
static void sh_intc_toggle_mask(struct intc_desc *desc, intc_enum id,
@@ -260,7 +260,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset,
case INTC_MODE_ENABLE_REG | INTC_MODE_IS_PRIO: break;
case INTC_MODE_DUAL_SET: value |= *valuep; break;
case INTC_MODE_DUAL_CLR: value = *valuep & ~value; break;
- default: assert(0);
+ default: abort();
}
for (k = 0; k <= first; k++) {