summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-23 23:12:48 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-24 00:20:39 +0100
commit5ce1946f4def03e0ab7127dd5729949a32e060ac (patch)
treebc3c65f528b95ad981e367063788596cdac46d7b /src
parent556f107f95a2b3e59162f8282ce2d717bbfd2e2a (diff)
question: drop dns_question_is_superset() which we don't use anymore
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-dns-question.c44
-rw-r--r--src/resolve/resolved-dns-question.h1
2 files changed, 0 insertions, 45 deletions
diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c
index 868658652d..75f2ed6042 100644
--- a/src/resolve/resolved-dns-question.c
+++ b/src/resolve/resolved-dns-question.c
@@ -155,50 +155,6 @@ int dns_question_is_valid(DnsQuestion *q) {
return 1;
}
-int dns_question_is_superset(DnsQuestion *q, DnsQuestion *other) {
- unsigned j;
- int r;
-
- /* Checks if all keys in "other" are also contained in "q" */
-
- if (!other)
- return 1;
-
- for (j = 0; j < other->n_keys; j++) {
- DnsResourceKey *b = other->keys[j];
- bool found = false;
- unsigned i;
-
- if (!q)
- return 0;
-
- for (i = 0; i < q->n_keys; i++) {
- DnsResourceKey *a = q->keys[i];
-
- r = dns_name_equal(DNS_RESOURCE_KEY_NAME(a), DNS_RESOURCE_KEY_NAME(b));
- if (r < 0)
- return r;
-
- if (r == 0)
- continue;
-
- if (a->class != b->class && a->class != DNS_CLASS_ANY)
- continue;
-
- if (a->type != b->type && a->type != DNS_TYPE_ANY)
- continue;
-
- found = true;
- break;
- }
-
- if (!found)
- return 0;
- }
-
- return 1;
-}
-
int dns_question_contains(DnsQuestion *a, DnsResourceKey *k) {
unsigned j;
int r;
diff --git a/src/resolve/resolved-dns-question.h b/src/resolve/resolved-dns-question.h
index 7f65e47158..9894ef6ec5 100644
--- a/src/resolve/resolved-dns-question.h
+++ b/src/resolve/resolved-dns-question.h
@@ -46,7 +46,6 @@ int dns_question_add(DnsQuestion *q, DnsResourceKey *key);
int dns_question_matches_rr(DnsQuestion *q, DnsResourceRecord *rr);
int dns_question_matches_cname(DnsQuestion *q, DnsResourceRecord *rr);
int dns_question_is_valid(DnsQuestion *q);
-int dns_question_is_superset(DnsQuestion *q, DnsQuestion *other);
int dns_question_contains(DnsQuestion *a, DnsResourceKey *k);
int dns_question_is_equal(DnsQuestion *a, DnsQuestion *b);