(__libc_res_nsearch): Protect the debugging printf with #ifdef DEBUG
authordrepper <drepper>
Thu, 12 Aug 2004 17:36:51 +0000 (17:36 +0000)
committerdrepper <drepper>
Thu, 12 Aug 2004 17:36:51 +0000 (17:36 +0000)
and RES_DEBUG check.

resolv/res_query.c

index bad1495..d2ef3b5 100644 (file)
@@ -239,8 +239,11 @@ __libc_res_nsearch(res_state statp,
                return (__libc_res_nquery(statp, cp, class, type, answer,
                                          anslen, answerp));
 
-       printf("dots=%d, statp->ndots=%d, trailing_dot=%d, name=%s\n",
-              (int)dots,(int)statp->ndots,(int)trailing_dot,name);
+#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