resolved: move assertion

Make a scope with invalid protocol state fail as soon as possible.
This commit is contained in:
Daniel Mack 2015-08-04 10:37:59 +02:00
parent 106784ebb7
commit 9c56a6f3e2

View file

@ -375,7 +375,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) {
break; break;
default: default:
break; assert_not_reached("Invalid DNS protocol.");
} }
if (t->received != p) { if (t->received != p) {
@ -412,7 +412,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) {
break; break;
default: default:
assert_not_reached("Invalid DNS protocol."); break;
} }
if (DNS_PACKET_TC(p)) { if (DNS_PACKET_TC(p)) {