Patch for nss/getent.c
Mark Kettenis
kettenis@wins.uva.nl
Mon Jul 17 03:15:00 GMT 2000
This patch makes sure the getent program always prints a space between
the numeric address and the hostname. Makes the program somwhat more
usable in combination with IPv6 hosts.
Mark
2000-07-17 Mark Kettenis <kettenis@gnu.org>
* nss/getent.c (print_hosts): Make sure we always print a space
between numeric addresses and hostnames.
Index: nss/getent.c
===================================================================
RCS file: /cvs/glibc/libc/nss/getent.c,v
retrieving revision 1.4
diff -u -p -r1.4 getent.c
--- getent.c 2000/07/12 19:52:39 1.4
+++ getent.c 2000/07/17 10:11:54
@@ -257,8 +257,9 @@ print_hosts (struct hostent *host)
buf, sizeof (buf));
fputs (ip, stdout);
- for (i = strlen (ip); i < 16; ++i)
+ for (i = strlen (ip); i < 15; ++i)
fputs (" ", stdout);
+ fputs (" ", stdout);
fputs (host->h_name, stdout);
i = 0;
More information about the Libc-hacker
mailing list