aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-04-04 14:13:03 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-04-04 20:56:23 +0200
commit75b3a15e077dbfdfd8cbb3449369379e700b9972 (patch)
tree35dfc0e3c5be9ba615d67b628cbc8d088d7de21e
parent07d6f1a3ca990e0e4f93b010605d4d87a3abdf24 (diff)
downloadglibc-75b3a15e077dbfdfd8cbb3449369379e700b9972.zip
glibc-75b3a15e077dbfdfd8cbb3449369379e700b9972.tar.gz
glibc-75b3a15e077dbfdfd8cbb3449369379e700b9972.tar.bz2
nss_dns: Remove superfluous dn_expand call from network handling
-rw-r--r--ChangeLog5
-rw-r--r--resolv/nss_dns/dns-network.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6132af3..406b961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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.
* resolv/Makefile (tests): Add tst-ns_name.
(tst-ns_name): Link with -lresolv.
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 45f7f18..fd8c565 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -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 */