summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-answer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-dns-answer.h')
-rw-r--r--src/resolve/resolved-dns-answer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-answer.h b/src/resolve/resolved-dns-answer.h
index b2b86d1772..4a92bd1150 100644
--- a/src/resolve/resolved-dns-answer.h
+++ b/src/resolve/resolved-dns-answer.h
@@ -87,6 +87,10 @@ static inline unsigned dns_answer_size(DnsAnswer *a) {
return a ? a->n_rrs : 0;
}
+static inline bool dns_answer_isempty(DnsAnswer *a) {
+ return dns_answer_size(a) <= 0;
+}
+
void dns_answer_dump(DnsAnswer *answer, FILE *f);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsAnswer*, dns_answer_unref);