public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] getcanonname: Fix a typo
@ 2023-09-06  0:23 Siddhesh Poyarekar
  2023-09-06  7:23 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Siddhesh Poyarekar @ 2023-09-06  0:23 UTC (permalink / raw)
  To: libc-alpha

This code is generally unused in practice since there don't seem to be
any NSS modules that only implement _nss_MOD_gethostbyname2_r and not
_nss_MOD_gethostbyname3_r.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---
 sysdeps/posix/getaddrinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 0356b622be..d17b97d79a 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -337,7 +337,7 @@ getcanonname (nss_action_list nip, struct gaih_addrtuple *at, const char *name)
 	   string.  */
 	s = (char *) name;
     }
-  return __strdup (name);
+  return __strdup (s);
 }
 
 /* Process looked up canonical name and if necessary, decode to IDNA.  Result
-- 
2.41.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] getcanonname: Fix a typo
  2023-09-06  0:23 [PATCH] getcanonname: Fix a typo Siddhesh Poyarekar
@ 2023-09-06  7:23 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2023-09-06  7:23 UTC (permalink / raw)
  To: Siddhesh Poyarekar via Libc-alpha; +Cc: Siddhesh Poyarekar

On Sep 05 2023, Siddhesh Poyarekar via Libc-alpha wrote:

> This code is generally unused in practice since there don't seem to be
> any NSS modules that only implement _nss_MOD_gethostbyname2_r and not
> _nss_MOD_gethostbyname3_r.

Ok.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-06  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06  0:23 [PATCH] getcanonname: Fix a typo Siddhesh Poyarekar
2023-09-06  7:23 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).