mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Simplify way we tag unreachable code with only ISC_UNREACHABLE()
Previously, the unreachable code paths would have to be tagged with: INSIST(0); ISC_UNREACHABLE(); There was also older parts of the code that used comment annotation: /* NOTREACHED */ Unify the handling of unreachable code paths to just use: UNREACHABLE(); The UNREACHABLE() macro now asserts when reached and also uses __builtin_unreachable(); when such builtin is available in the compiler.
This commit is contained in:
@@ -118,7 +118,7 @@ schedule(isc_timer_t *timer, isc_time_t *now, bool signal_ok) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -426,7 +426,7 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
timer->index = 0;
|
||||
|
Reference in New Issue
Block a user