Blame SOURCES/glibc-rh656014.patch

b9ba6d
2010-11-24  Andreas Schwab  <schwab@redhat.com>
b9ba6d
b9ba6d
	* resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
b9ba6d
	specially.
b9ba6d
	(gaih_getanswer_slice): Likewise.
b9ba6d
b9ba6d
Index: glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.12-2-gc4ccff1.orig/resolv/nss_dns/dns-host.c
b9ba6d
+++ glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
b9ba6d
@@ -599,7 +599,6 @@ getanswer_r (const querybuf *answer, int
b9ba6d
   int (*name_ok) (const char *);
b9ba6d
   u_char packtmp[NS_MAXCDNAME];
b9ba6d
   int have_to_map = 0;
b9ba6d
-  int32_t ttl = 0;
b9ba6d
   uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
b9ba6d
   buffer += pad;
b9ba6d
   if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
b9ba6d
@@ -733,7 +732,7 @@ getanswer_r (const querybuf *answer, int
b9ba6d
       cp += INT16SZ;			/* type */
b9ba6d
       class = __ns_get16 (cp);
b9ba6d
       cp += INT16SZ;			/* class */
b9ba6d
-      ttl = __ns_get32 (cp);
b9ba6d
+      int32_t ttl = __ns_get32 (cp);
b9ba6d
       cp += INT32SZ;			/* TTL */
b9ba6d
       n = __ns_get16 (cp);
b9ba6d
       cp += INT16SZ;			/* len */
b9ba6d
@@ -907,7 +906,7 @@ getanswer_r (const querybuf *answer, int
b9ba6d
 	    {
b9ba6d
 	      register int nn;
b9ba6d
 
b9ba6d
-	      if (ttlp != NULL && ttl != 0)
b9ba6d
+	      if (ttlp != NULL)
b9ba6d
 		*ttlp = ttl;
b9ba6d
 	      if (canonp != NULL)
b9ba6d
 		*canonp = bp;
b9ba6d
@@ -1163,7 +1162,7 @@ gaih_getanswer_slice (const querybuf *an
b9ba6d
 
b9ba6d
       if (*firstp)
b9ba6d
 	{
b9ba6d
-	  if (ttl != 0 && ttlp != NULL)
b9ba6d
+	  if (ttlp != NULL)
b9ba6d
 	    *ttlp = ttl;
b9ba6d
 
b9ba6d
 	  (*pat)->name = canon ?: h_name;