[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r12131 - in /fsf/trunk/libc: ChangeLog resolv/nss_dns/dns-host.c



Author: eglibc
Date: Fri Nov 26 00:03:23 2010
New Revision: 12131

Log:
Import glibc-mainline for 2010-11-26

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/resolv/nss_dns/dns-host.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Nov 26 00:03:23 2010
@@ -1,3 +1,9 @@
+2010-11-24  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
+	specially.
+	(gaih_getanswer_slice): Likewise.
+
 2010-10-20  Jakub Jelinek  <jakub@xxxxxxxxxx>
 
 	* sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Fix up inline asm.

Modified: fsf/trunk/libc/resolv/nss_dns/dns-host.c
==============================================================================
--- fsf/trunk/libc/resolv/nss_dns/dns-host.c (original)
+++ fsf/trunk/libc/resolv/nss_dns/dns-host.c Fri Nov 26 00:03:23 2010
@@ -599,7 +599,6 @@
   int (*name_ok) (const char *);
   u_char packtmp[NS_MAXCDNAME];
   int have_to_map = 0;
-  int32_t ttl = 0;
   uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
   buffer += pad;
   if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
@@ -733,7 +732,7 @@
       cp += INT16SZ;			/* type */
       class = __ns_get16 (cp);
       cp += INT16SZ;			/* class */
-      ttl = __ns_get32 (cp);
+      int32_t ttl = __ns_get32 (cp);
       cp += INT32SZ;			/* TTL */
       n = __ns_get16 (cp);
       cp += INT16SZ;			/* len */
@@ -907,7 +906,7 @@
 	    {
 	      register int nn;
 
-	      if (ttlp != NULL && ttl != 0)
+	      if (ttlp != NULL)
 		*ttlp = ttl;
 	      if (canonp != NULL)
 		*canonp = bp;
@@ -1163,7 +1162,7 @@
 
       if (*firstp)
 	{
-	  if (ttl != 0 && ttlp != NULL)
+	  if (ttlp != NULL)
 	    *ttlp = ttl;
 
 	  (*pat)->name = canon ?: h_name;