summaryrefslogtreecommitdiff
path: root/qdict.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
commitc1df8fb132eed31f3962b993e276c17f85ebbce9 (patch)
treedaf9f3fd9fa34306ac03fbb6efc72860efc879ca /qdict.c
parent5596ba298b5bbd238b2eff48db7876f3a7c95d1e (diff)
downloadqemu-c1df8fb132eed31f3962b993e276c17f85ebbce9.tar.gz
qemu-c1df8fb132eed31f3962b993e276c17f85ebbce9.tar.bz2
qemu-c1df8fb132eed31f3962b993e276c17f85ebbce9.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 'qdict.c')
-rw-r--r--qdict.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qdict.c b/qdict.c
index 7fb425a0ca..aae57bf450 100644
--- a/qdict.c
+++ b/qdict.c
@@ -194,8 +194,7 @@ double qdict_get_double(const QDict *qdict, const char *key)
case QTYPE_QINT:
return qint_get_int(qobject_to_qint(obj));
default:
- assert(0);
- return 0.0;
+ abort();
}
}