]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nss_dns: Remove superfluous dn_expand call from network handling
authorFlorian Weimer <fweimer@redhat.com>
Tue, 4 Apr 2017 12:13:03 +0000 (14:13 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 4 Apr 2017 18:56:23 +0000 (20:56 +0200)
ChangeLog
resolv/nss_dns/dns-network.c

index 6132af36c3f02802d60a13b58f94d9f6e8667e68..406b961f6248d44e067e2f8c07f5c206da95b7dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-04  Florian Weimer  <fweimer@redhat.com>
+
+       * resolv/nss_dns/dns-network.c (getanswer_r): Remove __dn_expand
+       call whose result is not used.
+
 2017-04-04  Florian Weimer  <fweimer@redhat.com>
 
        * resolv/tst-ns_name.c, resolv/tst-ns_name.data: New file.
index 45f7f1805701e0a469ee4c8b4711c6620c5b8cfb..fd8c5656c0cedd2762d360a6f578c3e3cba47fe0 100644 (file)
@@ -324,11 +324,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 
   while (--answer_count >= 0 && cp < end_of_message)
     {
-      int n = dn_expand (answer->buf, end_of_message, cp, bp, linebuflen);
-      int type, class;
-
-      n = __ns_name_unpack (answer->buf, end_of_message, cp,
-                           packtmp, sizeof packtmp);
+      int n = __ns_name_unpack (answer->buf, end_of_message, cp,
+                               packtmp, sizeof packtmp);
       if (n != -1 && __ns_name_ntop (packtmp, bp, linebuflen) == -1)
        {
          if (errno == EMSGSIZE)
@@ -350,6 +347,7 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
          return NSS_STATUS_UNAVAIL;
        }
 
+      int type, class;
       GETSHORT (type, cp);
       GETSHORT (class, cp);
       cp += INT32SZ;           /* TTL */