summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-transaction.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-15 16:14:53 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-19 08:10:29 +0900
commit03677889f0ef42cdc534bf3b31265a054b20a354 (patch)
tree53caa0977a8afc5d0ee90e038ffd566e9e22451f /src/resolve/resolved-dns-transaction.c
parent40f35786b0030f1f7c4b88828776ada1dd74d03e (diff)
downloadsystemd-03677889f0ef42cdc534bf3b31265a054b20a354.tar.gz
list: declare iterator of LIST_FOREACH() in the loop
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r--src/resolve/resolved-dns-transaction.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index f937f9f7b5..678ece4fc0 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -634,12 +634,9 @@ static int on_stream_complete(DnsStream *s, int error) {
}
}
- if (error != 0) {
- DnsTransaction *t, *n;
-
+ if (error != 0)
LIST_FOREACH_SAFE(transactions_by_stream, t, n, s->transactions)
on_transaction_stream_error(t, error);
- }
return 0;
}
@@ -1762,7 +1759,6 @@ static int dns_transaction_prepare(DnsTransaction *t, usec_t ts) {
static int dns_transaction_make_packet_mdns(DnsTransaction *t) {
_cleanup_(dns_packet_unrefp) DnsPacket *p = NULL;
bool add_known_answers = false;
- DnsTransaction *other;
DnsResourceKey *tkey;
_cleanup_set_free_ Set *keys = NULL;
unsigned qdcount;