diff options
author | Tom Gundersen <teg@jklm.no> | 2015-12-03 01:52:01 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-12-03 01:52:01 +0100 |
commit | 3f967a4ccf1846514bd638f38e4f487bb4e1c317 (patch) | |
tree | 07bb4f6a9b1defea1df208a2f5097433a2e9787e /src/resolve/resolved-dns-question.h | |
parent | 5449f1e3312e5467ce321fc2d7aa16a0ce0c60d2 (diff) | |
parent | 964ef14c2525f3a0311acb24c6814c5bfbe43cfc (diff) |
Merge pull request #2087 from poettering/dnssec
Basic DNSSEC support, and unrelated fixes
Diffstat (limited to 'src/resolve/resolved-dns-question.h')
-rw-r--r-- | src/resolve/resolved-dns-question.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/resolve/resolved-dns-question.h b/src/resolve/resolved-dns-question.h index e77116c03a..5ffb63e250 100644 --- a/src/resolve/resolved-dns-question.h +++ b/src/resolve/resolved-dns-question.h @@ -23,9 +23,10 @@ typedef struct DnsQuestion DnsQuestion; +#include "macro.h" #include "resolved-dns-rr.h" -/* A simple array of resources keys */ +/* A simple array of resource keys */ struct DnsQuestion { unsigned n_ref; @@ -55,10 +56,12 @@ const char *dns_question_first_name(DnsQuestion *q); DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuestion*, dns_question_unref); -#define DNS_QUESTION_FOREACH(key, q) \ - for (unsigned _i = ({ \ +#define _DNS_QUESTION_FOREACH(u, key, q) \ + for (unsigned UNIQ_T(i, u) = ({ \ (key) = ((q) && (q)->n_keys > 0) ? (q)->keys[0] : NULL; \ 0; \ }); \ - (q) && ((_i) < (q)->n_keys); \ - _i++, (key) = (_i < (q)->n_keys ? (q)->keys[_i] : NULL)) + (q) && (UNIQ_T(i, u) < (q)->n_keys); \ + UNIQ_T(i, u)++, (key) = (UNIQ_T(i, u) < (q)->n_keys ? (q)->keys[UNIQ_T(i, u)] : NULL)) + +#define DNS_QUESTION_FOREACH(key, q) _DNS_QUESTION_FOREACH(UNIQ, key, q) |