resolved: move assertion
authorDaniel Mack <daniel@zonque.org>
Tue, 4 Aug 2015 08:37:59 +0000 (10:37 +0200)
committerDaniel Mack <daniel@zonque.org>
Tue, 25 Aug 2015 12:25:58 +0000 (14:25 +0200)
Make a scope with invalid protocol state fail as soon as possible.

src/resolve/resolved-dns-transaction.c

index faea058..7b84c1b 100644 (file)
@@ -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)) {