From 9c56a6f3e2b1fc193cf49f622b57f7ee17766cac Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 4 Aug 2015 10:37:59 +0200 Subject: [PATCH] resolved: move assertion Make a scope with invalid protocol state fail as soon as possible. --- src/resolve/resolved-dns-transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index faea0585d3..7b84c1bab8 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)) {