aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-14 06:47:48 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-14 06:47:48 +0000
commit5c81b3e1b77a3f47a4f29e21c5e61d12a7369e93 (patch)
treef80c807f0bb6075e7696a1632e42e540bd7aca76
parent8500b0cabadf7500bdccdf6b94ad3f36bf7a96c9 (diff)
downloadglibc-5c81b3e1b77a3f47a4f29e21c5e61d12a7369e93.tar
glibc-5c81b3e1b77a3f47a4f29e21c5e61d12a7369e93.tar.gz
glibc-5c81b3e1b77a3f47a4f29e21c5e61d12a7369e93.tar.bz2
glibc-5c81b3e1b77a3f47a4f29e21c5e61d12a7369e93.zip
Update.
* nss/getent.c (ahosts_keys): ai_canonname is NULL for all but the first returned entry. Print name only if not NULL.
-rw-r--r--ChangeLog3
-rw-r--r--nss/getent.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f809ef8c1e..5b6b668173 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2004-08-13 Ulrich Drepper <drepper@redhat.com>
+ * nss/getent.c (ahosts_keys): ai_canonname is NULL for all but the
+ first returned entry. Print name only if not NULL.
+
* nis/nss_nis/nis-netgrp.c: Remove locking by using data in struct
__netgrent object passed in instead of global variables.
Optimize.
diff --git a/nss/getent.c b/nss/getent.c
index bcc363dccf..4be9535b9d 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -348,7 +348,7 @@ ahosts_keys (int number, char *key[])
&((struct sockaddr_in *) runp->ai_addr)->sin_addr,
buf, sizeof (buf)),
sockstr,
- runp->ai_canonname);
+ runp->ai_canonname ?: "");
runp = runp->ai_next;
}