From patchwork Fri Jun 30 10:39:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 782777 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 3wzY4g078Sz9s9Y for ; Fri, 30 Jun 2017 20:42:10 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="bTcRn5LT"; 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= LNvqgePfIrppJcELs9NabBJf+MIZugyaNrwn9c30+cw3OMRg8hUJFdpNdQ5hw74h 92UzlL8bLO0Kyoqh4qQQbMShovYqKPdue0WZDcpW7lRKma4wcmyVKOMutvEfsR1C HFMfl4bzjKxJRSIBuq3EbPYxKfX7TI9GgFpzWk56wjA= 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=xyQ2CK /A5rSj7LiI9HmaIEgFCMw=; b=bTcRn5LTSdrmoa2LMT/4WHry8IYWqVOjUG8h/v Xlylf4A6Zy2NKtG07bcrxWOkinMcBlkJxxM1S+N/5nGd/P1w71Ovfqn7Q31ZZscL /AKoLhwfy5zEGcK0Wg1rhByNvPl7EXXIbWYAsurgUDGPvkr1UriDtRTBydkDVycE MVrBo= Received: (qmail 65017 invoked by alias); 30 Jun 2017 10:39:16 -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 64868 invoked by uid 89); 30 Jun 2017 10:39:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, 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 4239CC04D28B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4239CC04D28B Date: Fri, 30 Jun 2017 12:39:10 +0200 To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] resolv: Remove DEBUG from resolv/res_query.c User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170630103910.61233439942F0@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2017-06-30 Florian Weimer * resolv/res_query.c (DEBUG): Remove preprocessor conditional. diff --git a/resolv/res_query.c b/resolv/res_query.c index 5312c8e..760bf32 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -80,9 +80,6 @@ #include #include -/* Options. Leave them on. */ -/* #undef DEBUG */ - #if PACKETSZ > 65536 #define MAXPACKET PACKETSZ #else @@ -133,11 +130,6 @@ __libc_res_nquery(res_state statp, again: hp->rcode = NOERROR; /* default */ -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf(";; res_query(%s, %d, %d)\n", name, class, type); -#endif - if (type == T_QUERY_A_AND_AAAA) { n = res_nmkquery(statp, QUERY, name, class, T_A, NULL, 0, NULL, @@ -211,10 +203,6 @@ __libc_res_nquery(res_state statp, } } if (__glibc_unlikely (n <= 0)) { -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf(";; res_query: mkquery failed\n"); -#endif RES_SET_H_ERRNO(statp, NO_RECOVERY); if (use_malloc) free (buf); @@ -227,10 +215,6 @@ __libc_res_nquery(res_state statp, if (use_malloc) free (buf); if (n < 0) { -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf(";; res_query: send error\n"); -#endif RES_SET_H_ERRNO(statp, TRY_AGAIN); return (n); } @@ -260,15 +244,6 @@ __libc_res_nquery(res_state statp, if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { -#ifdef DEBUG - if (statp->options & RES_DEBUG) { - printf(";; rcode = %d, ancount=%d\n", hp->rcode, - ntohs(hp->ancount)); - if (hp != hp2) - printf(";; rcode2 = %d, ancount2=%d\n", hp2->rcode, - ntohs(hp2->ancount)); - } -#endif switch (hp->rcode == NOERROR ? hp2->rcode : hp->rcode) { case NXDOMAIN: if ((hp->rcode == NOERROR && ntohs (hp->ancount) != 0) @@ -374,12 +349,6 @@ __libc_res_nsearch(res_state statp, anslen, answerp, answerp2, nanswerp2, resplen2, answerp2_malloced)); -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf("dots=%d, statp->ndots=%d, trailing_dot=%d, name=%s\n", - (int)dots,(int)statp->ndots,(int)trailing_dot,name); -#endif - /* * If there are enough dots in the name, let's just give it a * try 'as is'. The threshold can be set with the "ndots" option. @@ -590,11 +559,6 @@ __libc_res_nquerydomain(res_state statp, const char *longname = nbuf; size_t n, d; -#ifdef DEBUG - if (statp->options & RES_DEBUG) - printf(";; res_nquerydomain(%s, %s, %d, %d)\n", - name, domain?domain:"", class, type); -#endif if (domain == NULL) { n = strlen(name);