From patchwork Tue Apr 4 19:01:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 746918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vyJGz0PS5z9s7g for ; Wed, 5 Apr 2017 05:01:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="wOQfPlvP"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= r+IwtD8a0lTq/gnwOrK3hkfISDsaaRrwH4OK5bc7YN3zcHbUedIKghKkegboRcwZ wLRx/2nIoNpjYCbjRTuy4El1A1s21m0CvtuooESW8qDnPDPIwX29Bx32dPUjYzzY wJZmczfuHpUYA5qVCm57we6HhwfJaxz5qBJqmxpoCo4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=/Bi1ME DmqrqCMzWVgSugKhkbLt4=; b=wOQfPlvPY+n12mqggNBZZUqyvpHTI0hYmbFKnn azoWXX0kvm50T/Dj9NpC2mEDK8QhnFtXqwmKoOLT6mCdt9aTGno3IncD00iMesEn Y1p+e7rk6h2vIl2whKYgHDTGxlro7lU32HJ2pfXsgnYa5U0awDIjdBrIF4pDiXYe 8d0FY= Received: (qmail 37614 invoked by alias); 4 Apr 2017 19:01:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 37604 invoked by uid 89); 4 Apr 2017 19:01:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 00A7264D81 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 00A7264D81 Date: Tue, 04 Apr 2017 21:01:20 +0200 To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] nss_dns: Remove superfluous dn_expand call from network handling User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170404190120.E9DD64035F5CB@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2017-04-04 Florian Weimer * resolv/nss_dns/dns-network.c (getanswer_r): Remove __dn_expand call whose result is not used. 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 */