mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Unix sk_namelookup: fix compile failure at -DNO_IPV6.
The variable 'strbuf *realhost' was only initialised in the branch of the ifdefs where IPV6 is enabled, so at NO_IPV6, it's used uninitialised, which in my usual build configuration means a compile failure.
This commit is contained in:
parent
ed8a47c1dd
commit
af3ccd7946
@ -195,7 +195,7 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
|||||||
struct hostent *h = NULL;
|
struct hostent *h = NULL;
|
||||||
int n;
|
int n;
|
||||||
#endif
|
#endif
|
||||||
strbuf *realhost;
|
strbuf *realhost = strbuf_new();
|
||||||
|
|
||||||
/* Clear the structure and default to IPv4. */
|
/* Clear the structure and default to IPv4. */
|
||||||
memset(ret, 0, sizeof(SockAddr));
|
memset(ret, 0, sizeof(SockAddr));
|
||||||
@ -225,7 +225,6 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
|||||||
}
|
}
|
||||||
ret->superfamily = IP;
|
ret->superfamily = IP;
|
||||||
|
|
||||||
realhost = strbuf_new();
|
|
||||||
if (ret->ais->ai_canonname != NULL)
|
if (ret->ais->ai_canonname != NULL)
|
||||||
strbuf_catf(realhost, "%s", ret->ais->ai_canonname);
|
strbuf_catf(realhost, "%s", ret->ais->ai_canonname);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user