[PATCH] Fix getnameinfo bug
Jakub Jelinek
jakub@redhat.com
Thu Dec 7 23:41:00 GMT 2000
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
More information about the Libc-hacker
mailing list