summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.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-rr.c
parent40f35786b0030f1f7c4b88828776ada1dd74d03e (diff)
downloadsystemd-03677889f0ef42cdc534bf3b31265a054b20a354.tar.gz
list: declare iterator of LIST_FOREACH() in the loop
Diffstat (limited to 'src/resolve/resolved-dns-rr.c')
-rw-r--r--src/resolve/resolved-dns-rr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 720b4c58d7..83140d79f8 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -784,7 +784,6 @@ static char *format_types(Bitmap *types) {
}
static char *format_txt(DnsTxtItem *first) {
- DnsTxtItem *i;
size_t c = 1;
char *p, *s;
@@ -1358,8 +1357,6 @@ void dns_resource_record_hash_func(const DnsResourceRecord *rr, struct siphash *
case DNS_TYPE_TXT:
case DNS_TYPE_SPF: {
- DnsTxtItem *j;
-
LIST_FOREACH(items, j, rr->txt.items) {
siphash24_compress_safe(j->data, j->length, state);
@@ -1813,7 +1810,7 @@ bool dns_txt_item_equal(DnsTxtItem *a, DnsTxtItem *b) {
}
DnsTxtItem *dns_txt_item_copy(DnsTxtItem *first) {
- DnsTxtItem *i, *copy = NULL, *end = NULL;
+ DnsTxtItem *copy = NULL, *end = NULL;
LIST_FOREACH(items, i, first) {
DnsTxtItem *j;