From dfc6f86567c58bc4dd02f4db098fc4c2221e85b5 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 25 Jul 2013 18:21:28 +0200 Subject: misc: Use g_assert_not_reached for code which is expected to be unreachable The macro g_assert_not_reached is a better self documenting replacement for assert(0) or assert(false). Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- qdev-monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qdev-monitor.c') diff --git a/qdev-monitor.c b/qdev-monitor.c index e54dbc2c5d..e5adf6c9d0 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -360,7 +360,7 @@ static BusState *qbus_find(const char *path) /* find device */ if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) { - assert(0); + g_assert_not_reached(); elem[0] = len = 0; } pos += len; @@ -397,7 +397,7 @@ static BusState *qbus_find(const char *path) /* find bus */ if (sscanf(path+pos, "%127[^/]%n", elem, &len) != 1) { - assert(0); + g_assert_not_reached(); elem[0] = len = 0; } pos += len; -- cgit v1.2.3