]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Remove DEBUG preprocessor conditionals from res_setoptions
authorFlorian Weimer <fweimer@redhat.com>
Mon, 19 Jun 2017 11:18:45 +0000 (13:18 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 19 Jun 2017 12:24:24 +0000 (14:24 +0200)
ChangeLog
resolv/res_init.c

index 089e949fcbe42b2b6d888b5986b37f55366c81b3..0e2f1417efe0b31077e1e33882fdb9a328e32aea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * resolv/res-close.c: New file.
index eb380d3d56bc018c4390063448535fe86e639b9f..eb24fca3a6ecef9a63921f61b9a97d87e51ef2ad 100644 (file)
@@ -83,9 +83,6 @@
 #include <sys/types.h>
 #include <inet/net-internal.h>
 
-/* Options.  Should all be left alone. */
-/* #undef DEBUG */
-
 static void res_setoptions (res_state, const char *, const char *)
      internal_function;
 
@@ -383,11 +380,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
        const char *cp = options;
        int i;
 
-#ifdef DEBUG
-       if (statp->options & RES_DEBUG)
-               printf(";; res_setoptions(\"%s\", \"%s\")...\n",
-                      options, source);
-#endif
        while (*cp) {
                /* skip leading and inner runs of spaces */
                while (*cp == ' ' || *cp == '\t')
@@ -399,10 +391,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
                                statp->ndots = i;
                        else
                                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)) {
                        i = atoi(cp + sizeof("timeout:") - 1);
                        if (i <= RES_MAXRETRANS)
@@ -415,15 +403,6 @@ res_setoptions(res_state statp, const char *options, const char *source) {
                                statp->retry = i;
                        else
                                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 {
                  static const struct
                  {