|
|
8597553 |
commit e68111fbd63e84b66bd9e03b42721c79230b9b6d
|
|
|
8597553 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
8597553 |
Date: Mon Jun 19 13:18:45 2017 +0200
|
|
|
8597553 |
|
|
|
8597553 |
resolv: Remove DEBUG preprocessor conditionals from res_setoptions
|
|
|
8597553 |
|
|
|
8597553 |
diff --git a/resolv/res_init.c b/resolv/res_init.c
|
|
|
8597553 |
index eb380d3d56bc018c..eb24fca3a6ecef9a 100644
|
|
|
8597553 |
--- a/resolv/res_init.c
|
|
|
8597553 |
+++ b/resolv/res_init.c
|
|
|
8597553 |
@@ -83,9 +83,6 @@
|
|
|
8597553 |
#include <sys/types.h>
|
|
|
8597553 |
#include <inet/net-internal.h>
|
|
|
8597553 |
|
|
|
8597553 |
-/* Options. Should all be left alone. */
|
|
|
8597553 |
-/* #undef DEBUG */
|
|
|
8597553 |
-
|
|
|
8597553 |
static void res_setoptions (res_state, const char *, const char *)
|
|
|
8597553 |
internal_function;
|
|
|
8597553 |
|
|
|
8597553 |
@@ -383,11 +380,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|
|
8597553 |
const char *cp = options;
|
|
|
8597553 |
int i;
|
|
|
8597553 |
|
|
|
8597553 |
-#ifdef DEBUG
|
|
|
8597553 |
- if (statp->options & RES_DEBUG)
|
|
|
8597553 |
- printf(";; res_setoptions(\"%s\", \"%s\")...\n",
|
|
|
8597553 |
- options, source);
|
|
|
8597553 |
-#endif
|
|
|
8597553 |
while (*cp) {
|
|
|
8597553 |
/* skip leading and inner runs of spaces */
|
|
|
8597553 |
while (*cp == ' ' || *cp == '\t')
|
|
|
8597553 |
@@ -399,10 +391,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|
|
8597553 |
statp->ndots = i;
|
|
|
8597553 |
else
|
|
|
8597553 |
statp->ndots = RES_MAXNDOTS;
|
|
|
8597553 |
-#ifdef DEBUG
|
|
|
8597553 |
- if (statp->options & RES_DEBUG)
|
|
|
8597553 |
- printf(";;\tndots=%d\n", statp->ndots);
|
|
|
8597553 |
-#endif
|
|
|
8597553 |
} else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
|
|
|
8597553 |
i = atoi(cp + sizeof("timeout:") - 1);
|
|
|
8597553 |
if (i <= RES_MAXRETRANS)
|
|
|
8597553 |
@@ -415,15 +403,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
|
|
|
8597553 |
statp->retry = i;
|
|
|
8597553 |
else
|
|
|
8597553 |
statp->retry = RES_MAXRETRY;
|
|
|
8597553 |
- } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
|
|
|
8597553 |
-#ifdef DEBUG
|
|
|
8597553 |
- if (!(statp->options & RES_DEBUG)) {
|
|
|
8597553 |
- printf(";; res_setoptions(\"%s\", \"%s\")..\n",
|
|
|
8597553 |
- options, source);
|
|
|
8597553 |
- statp->options |= RES_DEBUG;
|
|
|
8597553 |
- }
|
|
|
8597553 |
- printf(";;\tdebug\n");
|
|
|
8597553 |
-#endif
|
|
|
8597553 |
} else {
|
|
|
8597553 |
static const struct
|
|
|
8597553 |
{
|