about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-10-16 15:20:20 +0000
committerUlrich Drepper <drepper@redhat.com>2006-10-16 15:20:20 +0000
commit4a85a8ee31c357ce499529ca76136cce0b6773e9 (patch)
treeb5c1f94461d4363d2fbb5eaf94dadb2b1d7fe180 /sysdeps
parentb8fed425d64b2b63726ef36aa168921b60507f66 (diff)
downloadglibc-4a85a8ee31c357ce499529ca76136cce0b6773e9.tar.gz
glibc-4a85a8ee31c357ce499529ca76136cce0b6773e9.tar.xz
glibc-4a85a8ee31c357ce499529ca76136cce0b6773e9.zip
[BZ #3369]
2006-10-16  Ulrich Drepper  <drepper@redhat.com>
	[BZ #3369]
	* sysdeps/posix/getaddrinfo.c (rfc3484_sort): Fix typos in rules 4
	and 7.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/posix/getaddrinfo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 9387e20db2..84a6293365 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1395,10 +1395,10 @@ rfc3484_sort (const void *p1, const void *p2)
     {
       if (!(a1->source_addr_flags & in6ai_homeaddress)
 	  && (a2->source_addr_flags & in6ai_homeaddress))
-	return -1;
+	return 1;
       if ((a1->source_addr_flags & in6ai_homeaddress)
 	  && !(a2->source_addr_flags & in6ai_homeaddress))
-	return 1;
+	return -1;
     }
 
   /* Rule 5: Prefer matching label.  */
@@ -1435,11 +1435,11 @@ rfc3484_sort (const void *p1, const void *p2)
   if (a1->got_source_addr)
     {
       if (!(a1->source_addr_flags & in6ai_temporary)
-	  && (a1->source_addr_flags & in6ai_temporary))
+	  && (a2->source_addr_flags & in6ai_temporary))
 	return -1;
       if ((a1->source_addr_flags & in6ai_temporary)
-	  && !(a1->source_addr_flags & in6ai_temporary))
-	return -1;
+	  && !(a2->source_addr_flags & in6ai_temporary))
+	return 1;
 
       /* XXX Do we need to check anything beside temporary addresses?  */
     }