summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_query.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c
index bad1495467..d2ef3b5e93 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -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