1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix build failures with NO_IPV6 defined.

In commit 20f818af12 I renamed a lot of variables called 'ret',
by using clang-rename to do the heavy lifting. But clang-rename only
saw instances of the variable name that the _compiler_ saw. The ones
that never got through the preprocessor weren't renamed, and I didn't
eyeball the patch hard enough to find instances in the #else branch of
ifdefs that should also have been renamed.

Thanks to Lars Wendler for the report and the fixes.
This commit is contained in:
Simon Tatham 2024-11-28 18:27:13 +00:00
parent b26077b1ae
commit c72a862724

View File

@ -279,7 +279,7 @@ SockAddr *sk_nonamelookup(const char *host)
#ifndef NO_IPV6 #ifndef NO_IPV6
addr->ais = NULL; addr->ais = NULL;
#else #else
ret->addresses = NULL; addr->addresses = NULL;
#endif #endif
addr->refcount = 1; addr->refcount = 1;
return addr; return addr;
@ -907,7 +907,7 @@ Socket *sk_newlistener(const char *srcaddr, int port, Plug *plug,
u.sin.sin_addr.s_addr = inet_addr(srcaddr); u.sin.sin_addr.s_addr = inet_addr(srcaddr);
if (u.sin.sin_addr.s_addr != (in_addr_t)(-1)) { if (u.sin.sin_addr.s_addr != (in_addr_t)(-1)) {
/* Override localhost_only with specified listen addr. */ /* Override localhost_only with specified listen addr. */
ret->localhost_only = ipv4_is_loopback(u.sin.sin_addr); s->localhost_only = ipv4_is_loopback(u.sin.sin_addr);
} }
addr = &u; addr = &u;
addrlen = sizeof(u.sin); addrlen = sizeof(u.sin);
@ -1641,8 +1641,8 @@ SockAddr *platform_get_x11_unix_address(const char *sockpath, int displaynum)
#ifndef NO_IPV6 #ifndef NO_IPV6
addr->ais = NULL; addr->ais = NULL;
#else #else
ret->addresses = NULL; addr->addresses = NULL;
ret->naddresses = 0; addr->naddresses = 0;
#endif #endif
addr->refcount = 1; addr->refcount = 1;
return addr; return addr;
@ -1666,8 +1666,8 @@ SockAddr *unix_sock_addr(const char *path)
#ifndef NO_IPV6 #ifndef NO_IPV6
addr->ais = NULL; addr->ais = NULL;
#else #else
ret->addresses = NULL; addr->addresses = NULL;
ret->naddresses = 0; addr->naddresses = 0;
#endif #endif
addr->refcount = 1; addr->refcount = 1;
return addr; return addr;