summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelte Jansen <jeltejan@NLnetLabs.nl>2006-04-06 12:46:46 +0200
committerJelte Jansen <jeltejan@NLnetLabs.nl>2006-04-06 12:46:46 +0200
commit40d9db217f6dda7aa23d09d46f54d37fe120e53f (patch)
treeb455ba64e3c38cc7da55a5a93463690b12a69e65
parent4052d4a66dc8cddc2af45a9b2b741019f2ab1a57 (diff)
downloadldns-40d9db217f6dda7aa23d09d46f54d37fe120e53f.tar.gz
lint
-rw-r--r--examples/ldns-keyfetcher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/ldns-keyfetcher.c b/examples/ldns-keyfetcher.c
index f151b473..d436bb87 100644
--- a/examples/ldns-keyfetcher.c
+++ b/examples/ldns-keyfetcher.c
@@ -387,6 +387,7 @@ read_root_hints(const char *filename)
ldns_status status;
ldns_rr_list *addresses = NULL;
ldns_rr *rr;
+ size_t i;
fp = fopen(filename, "r");
if (!fp) {
@@ -401,8 +402,8 @@ read_root_hints(const char *filename)
return NULL;
} else {
addresses = ldns_rr_list_new();
- for (line_nr = 0; line_nr < ldns_rr_list_rr_count(ldns_zone_rrs(z)); line_nr++) {
- rr = ldns_rr_list_rr(ldns_zone_rrs(z), line_nr);
+ for (i = 0; i < ldns_rr_list_rr_count(ldns_zone_rrs(z)); i++) {
+ rr = ldns_rr_list_rr(ldns_zone_rrs(z), i);
if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_A ||
ldns_rr_get_type(rr) == LDNS_RR_TYPE_AAAA) {
ldns_rr_list_push_rr(addresses, ldns_rr_clone(rr));