Merge branch 'ondrej/cleanup-unreachable-calls-v9_18' into 'v9_18'

Consistenly use UNREACHABLE() instead of ISC_UNREACHABLE()

See merge request isc-projects/bind9!6043
This commit is contained in:
Ondřej Surý 2022-03-28 21:56:42 +00:00
commit d45abcbd2f
7 changed files with 13 additions and 9 deletions

View file

@ -232,7 +232,7 @@ parse_options(int argc, char **argv) {
break;
default:
INSIST(0);
UNREACHABLE();
}
}

View file

@ -152,7 +152,7 @@ parse_options(int argc, char **argv) {
break;
default:
INSIST(0);
UNREACHABLE();
}
}

View file

@ -11,3 +11,9 @@
- INSIST(0);
- ISC_UNREACHABLE();
+ UNREACHABLE();
@@
@@
- UNREACHABLE();
UNREACHABLE();

View file

@ -2604,7 +2604,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
zbits &= have.nsipv4;
break;
default:
INSIST(0);
UNREACHABLE();
break;
}
} else if (netaddr->family == AF_INET6) {
@ -2630,7 +2630,7 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
zbits &= have.nsipv6;
break;
default:
INSIST(0);
UNREACHABLE();
break;
}
} else {

View file

@ -2285,7 +2285,7 @@ isc__nm_process_sock_buffer(isc_nmsocket_t *sock) {
}
break;
default:
INSIST(0);
UNREACHABLE();
}
}
}
@ -2818,7 +2818,6 @@ isc__nmsocket_reset(isc_nmsocket_t *sock) {
REQUIRE(sock->parent == NULL);
break;
default:
INSIST(0);
UNREACHABLE();
break;
}
@ -3544,7 +3543,6 @@ isc_nm_set_maxage(isc_nmhandle_t *handle, const uint32_t ttl) {
case isc_nm_tlssocket:
#endif /* HAVE_LIBNGHTTP2 */
default:
INSIST(0);
UNREACHABLE();
break;
}

View file

@ -82,7 +82,7 @@ isc_rwlock_trylock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
}
break;
default:
INSIST(0);
UNREACHABLE();
}
switch (ret) {

View file

@ -293,7 +293,7 @@ get_hooktab(query_ctx_t *qctx) {
result = _res; \
goto cleanup; \
default: \
INSIST(0); \
UNREACHABLE(); \
} \
} \
} while (false)