]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
move variable initialization
authorBrian Wellington <source@isc.org>
Tue, 29 May 2001 23:07:33 +0000 (23:07 +0000)
committerBrian Wellington <source@isc.org>
Tue, 29 May 2001 23:07:33 +0000 (23:07 +0000)
lib/dns/resolver.c
lib/lwres/lwres_gabn.c

index 44067d8e7255b575c01cabea2aac5f4c571ea005..a1d371e86d6d9b3308f323f39723f3791d691431 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.187.2.9 2001/03/20 23:49:36 bwelling Exp $ */
+/* $Id: resolver.c,v 1.187.2.10 2001/05/29 23:07:33 bwelling Exp $ */
 
 #include <config.h>
 
@@ -3022,6 +3022,7 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
        secure_domain = ISC_FALSE;
        eresult = ISC_R_SUCCESS;
        name = &fctx->name;
+       node = NULL;
 
        /*
         * Is DNSSEC validation required for this name?
@@ -3105,7 +3106,6 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
        } else
                event = NULL;
 
-       node = NULL;
        result = dns_db_findnode(res->view->cachedb, name, ISC_TRUE,
                                 &node);
        if (result != ISC_R_SUCCESS)
index 63ad5e2bdd2ab732175677fdcd99d3f305619823..dac2133966c0018942a53e286c68a5f6ca18867e 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lwres_gabn.c,v 1.25.4.1 2001/01/09 22:52:27 bwelling Exp $ */
+/* $Id: lwres_gabn.c,v 1.25.4.2 2001/05/29 23:02:57 bwelling Exp $ */
 
 #include <config.h>
 
@@ -287,6 +287,8 @@ lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
        gabn->naliases = naliases;
        gabn->naddrs = naddrs;
 
+       LWRES_LIST_INIT(addrlist);
+
        if (naliases > 0) {
                gabn->aliases = CTXMALLOC(sizeof(char *) * naliases);
                if (gabn->aliases == NULL) {
@@ -301,7 +303,6 @@ lwres_gabnresponse_parse(lwres_context_t *ctx, lwres_buffer_t *b,
                }
        }
 
-       LWRES_LIST_INIT(addrlist);
        for (x = 0 ; x < naddrs ; x++) {
                addr = CTXMALLOC(sizeof(lwres_addr_t));
                if (addr == NULL) {