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

index f5bb912d993b609293807a68fefc846ecfb3ebc6..7bece0d0583af8ca5a1e0cb51b22e6b6bd6d1c9f 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.215 2001/04/11 20:37:44 bwelling Exp $ */
+/* $Id: resolver.c,v 1.216 2001/05/29 23:07:28 bwelling Exp $ */
 
 #include <config.h>
 
@@ -3118,6 +3118,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?
@@ -3201,7 +3202,6 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
        } else
                event = NULL;
 
-       node = NULL;
        result = dns_db_findnode(fctx->cache, name, ISC_TRUE, &node);
        if (result != ISC_R_SUCCESS)
                goto unlock;
index 1fd2fb1ff30c73528173f9ff8be2018d9fe3a342..c4c5cb7eb0b04cc89c5a42550fde585e5ec1d219 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lwres_gabn.c,v 1.26 2001/01/09 21:59:30 bwelling Exp $ */
+/* $Id: lwres_gabn.c,v 1.27 2001/05/29 23:02:52 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) {