mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Don't initialize TMPSTORE directly.
Submitted by Andre Majorel.
This commit is contained in:
parent
6d93a95e37
commit
400201444f
@ -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>
|
2001-12-03 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
|
* ftp-basic.c (ftp_port): Don't return HOSTERR if we fail getting
|
||||||
|
@ -224,7 +224,7 @@ lookup_host (const char *host, int silent)
|
|||||||
if ((int)addr != -1)
|
if ((int)addr != -1)
|
||||||
{
|
{
|
||||||
char tmpstore[IP4_ADDRESS_LENGTH];
|
char tmpstore[IP4_ADDRESS_LENGTH];
|
||||||
char *lst[] = { tmpstore, NULL };
|
char *lst[2];
|
||||||
|
|
||||||
/* ADDR is defined to be in network byte order, which is what
|
/* ADDR is defined to be in network byte order, which is what
|
||||||
this returns, so we can just copy it to STORE_IP. However,
|
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;
|
offset = 0;
|
||||||
#endif
|
#endif
|
||||||
memcpy (tmpstore, (char *)&addr + offset, IP4_ADDRESS_LENGTH);
|
memcpy (tmpstore, (char *)&addr + offset, IP4_ADDRESS_LENGTH);
|
||||||
|
lst[0] = tmpstore;
|
||||||
|
lst[1] = NULL;
|
||||||
return address_list_new (lst);
|
return address_list_new (lst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user