]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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 faea0585d3636f2e465bdd1ad5fe8445ebc790d2..7b84c1bab86cf0bc8e1573e832fa3fd3a1f806b3 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)) {