summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drill/chasetrace.c2
-rw-r--r--examples/ldns-keyfetcher.c25
-rw-r--r--examples/ldns-signzone.c2
-rw-r--r--ldns/buffer.h4
-rw-r--r--ldns/dnssec.h7
-rw-r--r--resolver.c8
6 files changed, 28 insertions, 20 deletions
diff --git a/drill/chasetrace.c b/drill/chasetrace.c
index 7b7673d9..703234bc 100644
--- a/drill/chasetrace.c
+++ b/drill/chasetrace.c
@@ -227,6 +227,7 @@ do_chase(ldns_resolver *res, ldns_rdf *name, ldns_rr_type type, ldns_rr_class c,
ldns_rr_list *rrset = NULL;
ldns_status result;
+ bool cname_followed = false;
/*
ldns_rr_list *sigs;
ldns_rr *cur_sig;
@@ -244,7 +245,6 @@ do_chase(ldns_resolver *res, ldns_rdf *name, ldns_rr_type type, ldns_rr_class c,
ldns_dname2canonical(name);
- bool cname_followed = false;
pkt = ldns_pkt_clone(pkt_o);
if (!name) {
diff --git a/examples/ldns-keyfetcher.c b/examples/ldns-keyfetcher.c
index 28eec706..94f02166 100644
--- a/examples/ldns-keyfetcher.c
+++ b/examples/ldns-keyfetcher.c
@@ -238,11 +238,12 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
printf("Comparing answer list of answer to previous\n\n");
}
ldns_rr_list_sort(ldns_pkt_answer(p));
+ ldns_rr_list_sort(answer_list);
if (ldns_rr_list_compare(answer_list, ldns_pkt_answer(p)) != 0) {
fprintf(stderr, "ERROR: different answer answer from nameserver\n");
- fprintf(stderr, "I had (from previous servers):\n");
+ fprintf(stderr, "\nI had (from previous servers):\n");
ldns_rr_list_print(stderr, answer_list);
- fprintf(stderr, "I received (from nameserver at ");
+ fprintf(stderr, "\nI received (from nameserver at ");
ldns_rdf_print(stderr, ldns_resolver_nameservers(res)[0]);
fprintf(stderr, "):\n");
ldns_rr_list_print(stderr, ldns_pkt_answer(p));
@@ -260,11 +261,12 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
printf("Comparing authority list of answer to previous\n\n");
}
ldns_rr_list_sort(ldns_pkt_authority(p));
+ ldns_rr_list_sort(authority_list);
if (ldns_rr_list_compare(authority_list, ldns_pkt_authority(p)) != 0) {
fprintf(stderr, "ERROR: different authority answer from nameserver\n");
- fprintf(stderr, "I had (from previous servers):\n");
+ fprintf(stderr, "\nI had (from previous servers):\n");
ldns_rr_list_print(stderr, authority_list);
- fprintf(stderr, "I received (from nameserver at ");
+ fprintf(stderr, "\nI received (from nameserver at ");
ldns_rdf_print(stderr, ldns_resolver_nameservers(res)[0]);
fprintf(stderr, "):\n");
ldns_rr_list_print(stderr, ldns_pkt_authority(p));
@@ -325,11 +327,12 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
printf("Comparing answer list of answer to previous\n\n");
}
ldns_rr_list_sort(ldns_pkt_answer(p));
+ ldns_rr_list_sort(answer_list);
if (ldns_rr_list_compare(answer_list, ldns_pkt_answer(p)) != 0) {
fprintf(stderr, "ERROR: different answer answer from nameserver\n");
- fprintf(stderr, "I had (from previous servers):\n");
+ fprintf(stderr, "\nI had (from previous servers):\n");
ldns_rr_list_print(stderr, answer_list);
- fprintf(stderr, "I received (from nameserver at ");
+ fprintf(stderr, "\nI received (from nameserver at ");
ldns_rdf_print(stderr, ldns_resolver_nameservers(res)[0]);
fprintf(stderr, "):\n");
ldns_rr_list_print(stderr, ldns_pkt_answer(p));
@@ -347,11 +350,12 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
printf("Comparing authority list of answer to previous\n\n");
}
ldns_rr_list_sort(ldns_pkt_authority(p));
+ ldns_rr_list_sort(authority_list);
if (ldns_rr_list_compare(authority_list, ldns_pkt_authority(p)) != 0) {
fprintf(stderr, "ERROR: different authority answer from nameserver\n");
- fprintf(stderr, "I had (from previous servers):\n");
+ fprintf(stderr, "\nI had (from previous servers):\n");
ldns_rr_list_print(stderr, authority_list);
- fprintf(stderr, "I received (from nameserver at ");
+ fprintf(stderr, "\nI received (from nameserver at ");
ldns_rdf_print(stderr, ldns_resolver_nameservers(res)[0]);
fprintf(stderr, "):\n");
ldns_rr_list_print(stderr, ldns_pkt_authority(p));
@@ -466,11 +470,12 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
printf("1Comparing answer rr list of answer to previous\n");
}
ldns_rr_list_sort(ldns_pkt_answer(p));
+ ldns_rr_list_sort(answer_list);
if (ldns_rr_list_compare(answer_list, ldns_pkt_answer(p)) != 0) {
printf("ERROR: different answer section in response from nameserver\n");
- fprintf(stderr, "I had:\n");
+ fprintf(stderr, "\nI had:\n");
ldns_rr_list_print(stderr, answer_list);
- fprintf(stderr, "I received (from nameserver at ");
+ fprintf(stderr, "\nI received (from nameserver at ");
ldns_rdf_print(stderr, ldns_resolver_nameservers(res)[0]);
fprintf(stderr, "):\n");
ldns_rr_list_print(stderr, ldns_pkt_answer(p));
diff --git a/examples/ldns-signzone.c b/examples/ldns-signzone.c
index 83d207f9..f2cf8236 100644
--- a/examples/ldns-signzone.c
+++ b/examples/ldns-signzone.c
@@ -390,7 +390,7 @@ main(int argc, char *argv[])
pubkey_gen = ldns_key2rr(key);
if (verbosity >= 2) {
- printf(stderr, "Looking for key with keytag %u or %u\n", ldns_calc_keytag(pubkey_gen), ldns_calc_keytag(pubkey_gen) + 1);
+ fprintf(stderr, "Looking for key with keytag %u or %u\n", (unsigned int) ldns_calc_keytag(pubkey_gen), (unsigned int) ldns_calc_keytag(pubkey_gen) + 1);
}
for (key_i = 0; key_i < ldns_rr_list_rr_count(orig_rrs); key_i++) {
pubkey = ldns_rr_list_rr(orig_rrs, key_i);
diff --git a/ldns/buffer.h b/ldns/buffer.h
index 3249a33f..57e715d2 100644
--- a/ldns/buffer.h
+++ b/ldns/buffer.h
@@ -609,8 +609,8 @@ void *ldns_buffer_export(ldns_buffer *buffer);
/**
* Copy contents of the other buffer to this buffer. Silently truncated
* if this buffer is too small.
- * @param[result] resulting buffer which is copied to.
- * @param[from] what to copy to result.
+ * \param[out] *result resulting buffer which is copied to.
+ * \param[in] *from what to copy to result.
*/
void ldns_buffer_copy(ldns_buffer* result, ldns_buffer* from);
diff --git a/ldns/dnssec.h b/ldns/dnssec.h
index bd63ff09..72074c2b 100644
--- a/ldns/dnssec.h
+++ b/ldns/dnssec.h
@@ -140,6 +140,7 @@ void ldns_dnssec_trust_tree_free(ldns_dnssec_trust_tree *tree);
* \param[in] *out The file stream to print to
* \param[in] tree The trust tree to print
* \param[in] tabs Prepend each line with tabs*2 spaces
+ * \param[in] extended If true, add little explanation lines to the output
*/
void ldns_dnssec_trust_tree_print(FILE *out, ldns_dnssec_trust_tree *tree, size_t tabs, bool extended);
@@ -156,9 +157,9 @@ ldns_dnssec_trust_tree *ldns_dnssec_derive_trust_tree(ldns_dnssec_data_chain *da
/**
* Adds a trust tree as a parent for the given trust tree
*
- * \param[in] tree The tree to add the parent to
- * \param[in] parent_tree The parent tree to add
- * \param[in] parent_signature The RRSIG relevant to this parent/child connection
+ * \param[in] *tree The tree to add the parent to
+ * \param[in] *parent The parent tree to add
+ * \param[in] *parent_signature The RRSIG relevant to this parent/child connection
* \param[in] parent_status The DNSSEC status for this parent, child and RRSIG
* \return LDNS_STATUS_OK if the addition succeeds, error otherwise
*/
diff --git a/resolver.c b/resolver.c
index c645d1d6..b856b247 100644
--- a/resolver.c
+++ b/resolver.c
@@ -125,13 +125,15 @@ ldns_resolver_dnssec_anchors(const ldns_resolver *r)
bool
ldns_resolver_trusted_key(const ldns_resolver *r, ldns_rr_list * keys, ldns_rr_list * trusted_keys)
{
- unsigned int i; bool result = false;
+ size_t i;
+ bool result = false;
+
ldns_rr_list * trust_anchors = ldns_resolver_dnssec_anchors(r);
ldns_rr * cur_rr;
if (!r || !trust_anchors || !keys) { return false; }
- for (i=0; i< ldns_rr_list_rr_count(keys); i++) {
+ for (i = 0; i < ldns_rr_list_rr_count(keys); i++) {
cur_rr = ldns_rr_list_rr(keys, i);
if (ldns_rr_list_contains_rr(trust_anchors, cur_rr)) {
@@ -753,7 +755,7 @@ ldns_resolver_new_frm_fp_l(ldns_resolver **res, FILE *fp, int *line_nr)
#ifdef HAVE_SSL
tmp_rr = ldns_read_anchor_file(word);
#endif
- ldns_resolver_push_dnssec_anchor(r, tmp_rr);
+ (void) ldns_resolver_push_dnssec_anchor(r, tmp_rr);
ldns_rr_free(tmp_rr);
expect = LDNS_RESOLV_KEYWORD;
break;