ldns_rr_list* todo_nsec3s = ldns_rr_list_new();
ldns_rr_list* todo_nsec3_rrsigs = ldns_rr_list_new();
- ldns_status status = LDNS_STATUS_MEM_ERR;
+ ldns_status status = LDNS_STATUS_OK;
#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
ldns_zone* zone = NULL;
- if (ldns_zone_new_frm_fp_l(&zone, fp, origin,ttl, c, line_nr)
- != LDNS_STATUS_OK) goto error;
+ status = ldns_zone_new_frm_fp_l(&zone, fp, origin,ttl, c, line_nr);
+ if (status != LDNS_STATUS_OK)
+ goto error;
#else
uint32_t my_ttl = ttl;
#endif
- if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) goto error;
-
+ if (!newzone || !todo_nsec3s || !todo_nsec3_rrsigs ) {
+ status = LDNS_STATUS_MEM_ERR;
+ goto error;
+ }
if (origin) {
- if (!(my_origin = ldns_rdf_clone(origin))) goto error;
- if (!(my_prev = ldns_rdf_clone(origin))) goto error;
+ if (!(my_origin = ldns_rdf_clone(origin))) {
+ status = LDNS_STATUS_MEM_ERR;
+ goto error;
+ }
+ if (!(my_prev = ldns_rdf_clone(origin))) {
+ status = LDNS_STATUS_MEM_ERR;
+ goto error;
+ }
}
#ifdef FASTER_DNSSEC_ZONE_NEW_FRM_FP
- if (ldns_dnssec_zone_add_rr(newzone, ldns_zone_soa(zone))
- != LDNS_STATUS_OK) goto error;
+ if (ldns_zone_soa(zone))
+ status = ldns_dnssec_zone_add_rr(newzone, ldns_zone_soa(zone));
+ if (status != LDNS_STATUS_OK)
+ goto error;
for (i = 0; i < ldns_rr_list_rr_count(ldns_zone_rrs(zone)); i++) {
cur_rr = ldns_rr_list_rr(ldns_zone_rrs(zone), i);