This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix getnameinfo bug


Hi!

Nov, 6th changes to getnameinfo reversed the sense of NI_NOFQDN flag, which
is bad.

2000-12-08  Jakub Jelinek  <jakub@redhat.com>

	* inet/getnameinfo.c (getnameinfo): Fix NI_NOFQDN support.
	Reported by <pspencer@fields.utoronto.ca>.

--- libc/inet/getnameinfo.c.jj	Thu Nov 30 13:17:16 2000
+++ libc/inet/getnameinfo.c	Fri Dec  8 08:49:15 2000
@@ -259,7 +259,7 @@ getnameinfo (const struct sockaddr *sa, 
 	    if (h)
 	      {
 		char *c;
-		if ((flags & NI_NOFQDN) == 0
+		if ((flags & NI_NOFQDN)
 		    && (c = nrl_domainname ())
 		    && (c = strstr (h->h_name, c))
 		    && (c != h->h_name) && (*(--c) == '.'))

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]