From: Florian Weimer Date: Tue, 4 Apr 2017 12:13:03 +0000 (+0200) Subject: nss_dns: Remove superfluous dn_expand call from network handling X-Git-Tag: glibc-2.26~655 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75b3a15e077dbfdfd8cbb3449369379e700b9972;p=thirdparty%2Fglibc.git nss_dns: Remove superfluous dn_expand call from network handling --- diff --git a/ChangeLog b/ChangeLog index 6132af36c3f..406b961f624 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-04-04 Florian Weimer + + * resolv/nss_dns/dns-network.c (getanswer_r): Remove __dn_expand + call whose result is not used. + 2017-04-04 Florian Weimer * resolv/tst-ns_name.c, resolv/tst-ns_name.data: New file. diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c index 45f7f180570..fd8c5656c0c 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 */