diff mbox series

getcanonname: Fix a typo

Message ID 20230906002314.2118065-1-siddhesh@sourceware.org
State New
Headers show
Series getcanonname: Fix a typo | expand

Commit Message

Siddhesh Poyarekar Sept. 6, 2023, 12:23 a.m. UTC
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(-)

Comments

Andreas Schwab Sept. 6, 2023, 7:23 a.m. UTC | #1
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.
diff mbox series

Patch

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