mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
resolv: Remove DEBUG from resolv/res_query.c
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/res_query.c (DEBUG): Remove preprocessor conditional.
|
||||||
|
|
||||||
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/res_data.c: Reformat to GNU style.
|
* resolv/res_data.c: Reformat to GNU style.
|
||||||
|
@ -80,9 +80,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
/* Options. Leave them on. */
|
|
||||||
/* #undef DEBUG */
|
|
||||||
|
|
||||||
#if PACKETSZ > 65536
|
#if PACKETSZ > 65536
|
||||||
#define MAXPACKET PACKETSZ
|
#define MAXPACKET PACKETSZ
|
||||||
#else
|
#else
|
||||||
@ -133,11 +130,6 @@ __libc_res_nquery(res_state statp,
|
|||||||
again:
|
again:
|
||||||
hp->rcode = NOERROR; /* default */
|
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)
|
if (type == T_QUERY_A_AND_AAAA)
|
||||||
{
|
{
|
||||||
n = res_nmkquery(statp, QUERY, name, class, T_A, NULL, 0, NULL,
|
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)) {
|
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);
|
RES_SET_H_ERRNO(statp, NO_RECOVERY);
|
||||||
if (use_malloc)
|
if (use_malloc)
|
||||||
free (buf);
|
free (buf);
|
||||||
@ -227,10 +215,6 @@ __libc_res_nquery(res_state statp,
|
|||||||
if (use_malloc)
|
if (use_malloc)
|
||||||
free (buf);
|
free (buf);
|
||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
#ifdef DEBUG
|
|
||||||
if (statp->options & RES_DEBUG)
|
|
||||||
printf(";; res_query: send error\n");
|
|
||||||
#endif
|
|
||||||
RES_SET_H_ERRNO(statp, TRY_AGAIN);
|
RES_SET_H_ERRNO(statp, TRY_AGAIN);
|
||||||
return (n);
|
return (n);
|
||||||
}
|
}
|
||||||
@ -260,15 +244,6 @@ __libc_res_nquery(res_state statp,
|
|||||||
|
|
||||||
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
|
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
|
||||||
&& (hp2->rcode != NOERROR || ntohs(hp2->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) {
|
switch (hp->rcode == NOERROR ? hp2->rcode : hp->rcode) {
|
||||||
case NXDOMAIN:
|
case NXDOMAIN:
|
||||||
if ((hp->rcode == NOERROR && ntohs (hp->ancount) != 0)
|
if ((hp->rcode == NOERROR && ntohs (hp->ancount) != 0)
|
||||||
@ -374,12 +349,6 @@ __libc_res_nsearch(res_state statp,
|
|||||||
anslen, answerp, answerp2,
|
anslen, answerp, answerp2,
|
||||||
nanswerp2, resplen2, answerp2_malloced));
|
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
|
* 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.
|
* 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;
|
const char *longname = nbuf;
|
||||||
size_t n, d;
|
size_t n, d;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (statp->options & RES_DEBUG)
|
|
||||||
printf(";; res_nquerydomain(%s, %s, %d, %d)\n",
|
|
||||||
name, domain?domain:"<Nil>", class, type);
|
|
||||||
#endif
|
|
||||||
if (domain == NULL) {
|
if (domain == NULL) {
|
||||||
n = strlen(name);
|
n = strlen(name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user