mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
resolv: Remove DEBUG preprocessor conditionals from res_setoptions
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2017-06-19 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/res_init.c (res_setoptions): Remove DEBUG preprocessor
|
||||||
|
conditionals.
|
||||||
|
|
||||||
2017-06-19 Florian Weimer <fweimer@redhat.com>
|
2017-06-19 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/res-close.c: New file.
|
* resolv/res-close.c: New file.
|
||||||
|
@ -83,9 +83,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inet/net-internal.h>
|
#include <inet/net-internal.h>
|
||||||
|
|
||||||
/* Options. Should all be left alone. */
|
|
||||||
/* #undef DEBUG */
|
|
||||||
|
|
||||||
static void res_setoptions (res_state, const char *, const char *)
|
static void res_setoptions (res_state, const char *, const char *)
|
||||||
internal_function;
|
internal_function;
|
||||||
|
|
||||||
@ -383,11 +380,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|||||||
const char *cp = options;
|
const char *cp = options;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (statp->options & RES_DEBUG)
|
|
||||||
printf(";; res_setoptions(\"%s\", \"%s\")...\n",
|
|
||||||
options, source);
|
|
||||||
#endif
|
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
/* skip leading and inner runs of spaces */
|
/* skip leading and inner runs of spaces */
|
||||||
while (*cp == ' ' || *cp == '\t')
|
while (*cp == ' ' || *cp == '\t')
|
||||||
@ -399,10 +391,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|||||||
statp->ndots = i;
|
statp->ndots = i;
|
||||||
else
|
else
|
||||||
statp->ndots = RES_MAXNDOTS;
|
statp->ndots = RES_MAXNDOTS;
|
||||||
#ifdef DEBUG
|
|
||||||
if (statp->options & RES_DEBUG)
|
|
||||||
printf(";;\tndots=%d\n", statp->ndots);
|
|
||||||
#endif
|
|
||||||
} else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
|
} else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
|
||||||
i = atoi(cp + sizeof("timeout:") - 1);
|
i = atoi(cp + sizeof("timeout:") - 1);
|
||||||
if (i <= RES_MAXRETRANS)
|
if (i <= RES_MAXRETRANS)
|
||||||
@ -415,15 +403,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|||||||
statp->retry = i;
|
statp->retry = i;
|
||||||
else
|
else
|
||||||
statp->retry = RES_MAXRETRY;
|
statp->retry = RES_MAXRETRY;
|
||||||
} else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (!(statp->options & RES_DEBUG)) {
|
|
||||||
printf(";; res_setoptions(\"%s\", \"%s\")..\n",
|
|
||||||
options, source);
|
|
||||||
statp->options |= RES_DEBUG;
|
|
||||||
}
|
|
||||||
printf(";;\tdebug\n");
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user