summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2014-03-04 23:19:17 +0100
committerWillem Toorop <willem@nlnetlabs.nl>2014-03-04 23:19:17 +0100
commit37f7f97f5babd67fe755626fc6bd0f1cad83e10c (patch)
treeed38f0a64edcc5cf102ce27014a91ed45cad6989
parent2e8243111ea351ff9e764e4ede0a7295b95b3c9a (diff)
downloadldns-share_with_unbound.tar.gz
Fix lint (and var rename in something prettier)share_with_unbound
-rw-r--r--examples/ldns-read-zone.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/examples/ldns-read-zone.c b/examples/ldns-read-zone.c
index 2198568f..bded7929 100644
--- a/examples/ldns-read-zone.c
+++ b/examples/ldns-read-zone.c
@@ -69,17 +69,17 @@ void print_usage(const char* progname)
exit(EXIT_SUCCESS);
}
-void exclude_type(ldns_rdf **types2show, ldns_rr_type t)
+void exclude_type(ldns_rdf **show_types, ldns_rr_type t)
{
ldns_status s;
- assert(types2show);
+ assert(show_types != NULL);
- if (! *types2show && LDNS_STATUS_OK !=
- (s = ldns_rdf_bitmap_known_rr_types(types2show)))
+ if (! *show_types && LDNS_STATUS_OK !=
+ (s = ldns_rdf_bitmap_known_rr_types(show_types)))
goto fail;
- s = ldns_nsec_bitmap_clear_type(*types2show, t);
+ s = ldns_nsec_bitmap_clear_type(*show_types, t);
if (s == LDNS_STATUS_OK)
return;
fail:
@@ -89,17 +89,17 @@ fail:
exit(EXIT_FAILURE);
}
-void include_type(ldns_rdf **types2show, ldns_rr_type t)
+void include_type(ldns_rdf **show_types, ldns_rr_type t)
{
ldns_status s;
- assert(types2show);
+ assert(show_types != NULL);
- if (! *types2show && LDNS_STATUS_OK !=
- (s = ldns_rdf_bitmap_known_rr_types_space(types2show)))
+ if (! *show_types && LDNS_STATUS_OK !=
+ (s = ldns_rdf_bitmap_known_rr_types_space(show_types)))
goto fail;
- s = ldns_nsec_bitmap_set_type(*types2show, t);
+ s = ldns_nsec_bitmap_set_type(*show_types, t);
if (s == LDNS_STATUS_OK)
return;
fail:
@@ -126,7 +126,7 @@ main(int argc, char **argv)
ldns_rr *cur_rr;
ldns_output_format_storage fmt_storage;
ldns_output_format* fmt = ldns_output_format_init(&fmt_storage);
- ldns_rdf *types2show = NULL;
+ ldns_rdf *show_types = NULL;
ldns_soa_serial_increment_func_t soa_serial_increment_func = NULL;
int soa_serial_increment_func_data = 0;
@@ -145,16 +145,16 @@ main(int argc, char **argv)
canonicalize = true;
break;
case 'd':
- include_type(&types2show, LDNS_RR_TYPE_RRSIG);
- include_type(&types2show, LDNS_RR_TYPE_NSEC);
- include_type(&types2show, LDNS_RR_TYPE_NSEC3);
+ include_type(&show_types, LDNS_RR_TYPE_RRSIG);
+ include_type(&show_types, LDNS_RR_TYPE_NSEC);
+ include_type(&show_types, LDNS_RR_TYPE_NSEC3);
break;
case 'e':
- exclude_type(&types2show,
+ exclude_type(&show_types,
ldns_get_rr_type_by_name(optarg));
break;
case 'E':
- include_type(&types2show,
+ include_type(&show_types,
ldns_get_rr_type_by_name(optarg));
break;
case 'h':
@@ -168,9 +168,9 @@ main(int argc, char **argv)
break;
case 's':
case 'S':
- exclude_type(&types2show, LDNS_RR_TYPE_RRSIG);
- exclude_type(&types2show, LDNS_RR_TYPE_NSEC);
- exclude_type(&types2show, LDNS_RR_TYPE_NSEC3);
+ exclude_type(&show_types, LDNS_RR_TYPE_RRSIG);
+ exclude_type(&show_types, LDNS_RR_TYPE_NSEC);
+ exclude_type(&show_types, LDNS_RR_TYPE_NSEC3);
if (c == 's') break;
if (*optarg == '+' || *optarg == '-') {
soa_serial_increment_func_data =
@@ -264,13 +264,13 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- if (types2show) {
+ if (show_types) {
if (print_soa)
- print_soa = ldns_nsec_bitmap_covers_type(types2show,
+ print_soa = ldns_nsec_bitmap_covers_type(show_types,
LDNS_RR_TYPE_SOA);
stripped_list = ldns_rr_list_new();
while ((cur_rr = ldns_rr_list_pop_rr(ldns_zone_rrs(z))))
- if (ldns_nsec_bitmap_covers_type(types2show,
+ if (ldns_nsec_bitmap_covers_type(show_types,
ldns_rr_get_type(cur_rr)))
ldns_rr_list_push_rr(stripped_list, cur_rr);
else