зеркало из https://github.com/github/putty.git
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:
Родитель
ed8a47c1dd
Коммит
af3ccd7946
|
@ -195,7 +195,7 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
|||
struct hostent *h = NULL;
|
||||
int n;
|
||||
#endif
|
||||
strbuf *realhost;
|
||||
strbuf *realhost = strbuf_new();
|
||||
|
||||
/* Clear the structure and default to IPv4. */
|
||||
memset(ret, 0, sizeof(SockAddr));
|
||||
|
@ -225,7 +225,6 @@ SockAddr *sk_namelookup(const char *host, char **canonicalname, int address_fami
|
|||
}
|
||||
ret->superfamily = IP;
|
||||
|
||||
realhost = strbuf_new();
|
||||
if (ret->ais->ai_canonname != NULL)
|
||||
strbuf_catf(realhost, "%s", ret->ais->ai_canonname);
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче