From: Daniel Mack Date: Tue, 4 Aug 2015 08:37:59 +0000 (+0200) Subject: resolved: move assertion X-Git-Tag: v225~29^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c56a6f3e2b1fc193cf49f622b57f7ee17766cac;p=thirdparty%2Fsystemd.git resolved: move assertion Make a scope with invalid protocol state fail as soon as possible. --- diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index faea0585d36..7b84c1bab86 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -375,7 +375,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { break; default: - break; + assert_not_reached("Invalid DNS protocol."); } if (t->received != p) { @@ -412,7 +412,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { break; default: - assert_not_reached("Invalid DNS protocol."); + break; } if (DNS_PACKET_TC(p)) {