summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-query.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 11:58:29 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 12:14:05 +0200
commit90e74a66e663f1776457d599cb7d5ce44785a56c (patch)
tree16ce28594b8dc475e37df9a3b80accb96e748efa /src/resolve/resolved-dns-query.c
parent12375b95ddcb7dbbcbc5969b87822d39115d8acf (diff)
downloadsystemd-90e74a66e663f1776457d599cb7d5ce44785a56c.tar.gz
tree-wide: define iterator inside of the macro
Diffstat (limited to 'src/resolve/resolved-dns-query.c')
-rw-r--r--src/resolve/resolved-dns-query.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/resolve/resolved-dns-query.c b/src/resolve/resolved-dns-query.c
index 894b98834d..3afe4cf73b 100644
--- a/src/resolve/resolved-dns-query.c
+++ b/src/resolve/resolved-dns-query.c
@@ -129,14 +129,13 @@ static int dns_query_candidate_add_transaction(DnsQueryCandidate *c, DnsResource
static int dns_query_candidate_go(DnsQueryCandidate *c) {
DnsTransaction *t;
- Iterator i;
int r;
unsigned n = 0;
assert(c);
/* Start the transactions that are not started yet */
- SET_FOREACH(t, c->transactions, i) {
+ SET_FOREACH(t, c->transactions) {
if (t->state != DNS_TRANSACTION_NULL)
continue;
@@ -157,14 +156,13 @@ static int dns_query_candidate_go(DnsQueryCandidate *c) {
static DnsTransactionState dns_query_candidate_state(DnsQueryCandidate *c) {
DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS;
DnsTransaction *t;
- Iterator i;
assert(c);
if (c->error_code != 0)
return DNS_TRANSACTION_ERRNO;
- SET_FOREACH(t, c->transactions, i) {
+ SET_FOREACH(t, c->transactions) {
switch (t->state) {
@@ -729,7 +727,6 @@ static void dns_query_accept(DnsQuery *q, DnsQueryCandidate *c) {
bool has_authenticated = false, has_non_authenticated = false;
DnssecResult dnssec_result_authenticated = _DNSSEC_RESULT_INVALID, dnssec_result_non_authenticated = _DNSSEC_RESULT_INVALID;
DnsTransaction *t;
- Iterator i;
int r;
assert(q);
@@ -753,7 +750,7 @@ static void dns_query_accept(DnsQuery *q, DnsQueryCandidate *c) {
q->answer_errno = c->error_code;
}
- SET_FOREACH(t, c->transactions, i) {
+ SET_FOREACH(t, c->transactions) {
switch (t->state) {