]> 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)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 5 Feb 2014 15:18:15 +0000 (16:18 +0100)
resolver.c

index 16efc90f1a34638431e76b48e8f42d5826dc5bcd..b7d3e29e3ac1d7c5f5eeb35d0a5256adca0f45b4 100644 (file)
@@ -1276,7 +1276,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 */
@@ -1336,8 +1335,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);