]> sjero.net Git - wget/commitdiff
[svn] Don't initialize TMPSTORE directly.
authorhniksic <devnull@localhost>
Mon, 3 Dec 2001 17:31:23 +0000 (09:31 -0800)
committerhniksic <devnull@localhost>
Mon, 3 Dec 2001 17:31:23 +0000 (09:31 -0800)
Submitted by Andre Majorel.

src/ChangeLog
src/host.c

index 3f6c3bee2eee002f57acd40a00b0581a743875d4..39a9a87ad56eefee813575e32bee39b9d550dd08 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-03  Andre Majorel  <amajorel@teaser.fr>
+
+       * host.c (lookup_host): Don't initialize TMPSTORE directly because
+       it's not legal C.
+
 2001-12-03  Hrvoje Niksic  <hniksic@arsdigita.com>
 
        * ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
index a769fd9725d5d99470320526442790fc5ba9d0ae..7285cfb6a5b713181bcf149ac8ff4e229aa8c649 100644 (file)
@@ -224,7 +224,7 @@ lookup_host (const char *host, int silent)
   if ((int)addr != -1)
     {
       char tmpstore[IP4_ADDRESS_LENGTH];
-      char *lst[] = { tmpstore, NULL };
+      char *lst[2];
 
       /* ADDR is defined to be in network byte order, which is what
         this returns, so we can just copy it to STORE_IP.  However,
@@ -238,6 +238,8 @@ lookup_host (const char *host, int silent)
       offset = 0;
 #endif
       memcpy (tmpstore, (char *)&addr + offset, IP4_ADDRESS_LENGTH);
+      lst[0] = tmpstore;
+      lst[1] = NULL;
       return address_list_new (lst);
     }