]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix warning about unused variable.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 5 Feb 2014 15:18:15 +0000 (16:18 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Thu, 6 Feb 2014 09:30:58 +0000 (10:30 +0100)
resolver.c

index 971998468fd370d94cea75076d16a021b2a3e318..987ca5c5f99ba8bbf31e272cac642f9dd092b0b2 100644 (file)
@@ -1286,7 +1286,6 @@ ldns_axfr_next(ldns_resolver *resolver)
        ldns_rr *cur_rr;
        uint8_t *packet_wire;
        size_t packet_wire_size;
-       ldns_lookup_table *rcode;
        ldns_status status;
 
        /* check if start() has been called */
@@ -1346,8 +1345,10 @@ ldns_axfr_next(ldns_resolver *resolver)
 
                        return NULL;
                } else if (ldns_pkt_get_rcode(resolver->_cur_axfr_pkt) != 0) {
-                       rcode = ldns_lookup_by_id(ldns_rcodes, (int) ldns_pkt_get_rcode(resolver->_cur_axfr_pkt));
 #ifdef STDERR_MSGS
+                       ldns_lookup_table *rcode = ldns_lookup_by_id(
+                               ldns_rcodes,(int) ldns_pkt_get_rcode(
+                               resolver->_cur_axfr_pkt));
                        if (rcode) {
                                fprintf(stderr, "Error in AXFR: %s\n", 
                                                rcode->name);