From: Yu Watanabe Date: Mon, 25 Jun 2018 04:23:16 +0000 (+0900) Subject: resolve: fix return value type of dns_answer_has_dname_for_cname() X-Git-Tag: v240~1051^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5042ec4d7840f79d49688f07bf9bae7203ac50e;p=thirdparty%2Fsystemd.git resolve: fix return value type of dns_answer_has_dname_for_cname() --- diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 26caa63f944..66dc5d02995 100644 --- a/src/resolve/resolved-dns-answer.c +++ b/src/resolve/resolved-dns-answer.c @@ -799,7 +799,7 @@ void dns_answer_dump(DnsAnswer *answer, FILE *f) { } } -bool dns_answer_has_dname_for_cname(DnsAnswer *a, DnsResourceRecord *cname) { +int dns_answer_has_dname_for_cname(DnsAnswer *a, DnsResourceRecord *cname) { DnsResourceRecord *rr; int r; @@ -830,7 +830,6 @@ bool dns_answer_has_dname_for_cname(DnsAnswer *a, DnsResourceRecord *cname) { return r; if (r > 0) return 1; - } return 0; diff --git a/src/resolve/resolved-dns-answer.h b/src/resolve/resolved-dns-answer.h index aff594a00eb..9ce7d62773c 100644 --- a/src/resolve/resolved-dns-answer.h +++ b/src/resolve/resolved-dns-answer.h @@ -65,7 +65,7 @@ int dns_answer_remove_by_rr(DnsAnswer **a, DnsResourceRecord *rr); int dns_answer_copy_by_key(DnsAnswer **a, DnsAnswer *source, const DnsResourceKey *key, DnsAnswerFlags or_flags); int dns_answer_move_by_key(DnsAnswer **to, DnsAnswer **from, const DnsResourceKey *key, DnsAnswerFlags or_flags); -bool dns_answer_has_dname_for_cname(DnsAnswer *a, DnsResourceRecord *cname); +int dns_answer_has_dname_for_cname(DnsAnswer *a, DnsResourceRecord *cname); static inline size_t dns_answer_size(DnsAnswer *a) { return a ? a->n_rrs : 0;