* nss/getent.c (ahosts_keys): ai_canonname is NULL for all but the
	first returned entry.  Print name only if not NULL.
This commit is contained in:
Ulrich Drepper 2004-08-14 06:47:48 +00:00
parent 8500b0caba
commit 5c81b3e1b7
2 changed files with 4 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}