diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-07-25 18:21:28 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2013-07-27 11:22:54 +0400 |
commit | dfc6f86567c58bc4dd02f4db098fc4c2221e85b5 (patch) | |
tree | d493db0a108de25c7d2afaab885ec2d39ffe2c74 /hw/usb | |
parent | b031f413b9e68899032f04fc05fd0a6b62039b2b (diff) | |
download | qemu-dfc6f86567c58bc4dd02f4db098fc4c2221e85b5.zip qemu-dfc6f86567c58bc4dd02f4db098fc4c2221e85b5.tar.gz qemu-dfc6f86567c58bc4dd02f4db098fc4c2221e85b5.tar.bz2 |
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 <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/hcd-ehci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 67e4b24..010a0d0 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1357,7 +1357,7 @@ static void ehci_execute_complete(EHCIQueue *q) default: /* should not be triggerable */ fprintf(stderr, "USB invalid response %d\n", p->packet.status); - assert(0); + g_assert_not_reached(); break; } @@ -2142,7 +2142,7 @@ static void ehci_advance_state(EHCIState *ehci, int async) default: fprintf(stderr, "Bad state!\n"); again = -1; - assert(0); + g_assert_not_reached(); break; } @@ -2206,7 +2206,7 @@ static void ehci_advance_async_state(EHCIState *ehci) /* this should only be due to a developer mistake */ fprintf(stderr, "ehci: Bad asynchronous state %d. " "Resetting to active\n", ehci->astate); - assert(0); + g_assert_not_reached(); } } @@ -2256,7 +2256,7 @@ static void ehci_advance_periodic_state(EHCIState *ehci) /* this should only be due to a developer mistake */ fprintf(stderr, "ehci: Bad periodic state %d. " "Resetting to active\n", ehci->pstate); - assert(0); + g_assert_not_reached(); } } |