* [PATCH] Avoid unconditional debugging printf in res_query.c
@ 2004-08-12 14:46 Jakub Jelinek
2004-08-12 17:37 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2004-08-12 14:46 UTC (permalink / raw)
To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers
Hi!
We certainly shouldn't pollute stdout by default...
2004-08-12 Jakub Jelinek <jakub@redhat.com>
* resolv/res_query.c (__libc_res_nsearch): Protect the debugging
printf with #ifdef DEBUG and RES_DEBUG check.
--- libc/resolv/res_query.c.jj 2004-08-12 16:38:52.000000000 +0200
+++ libc/resolv/res_query.c 2004-08-12 16:42:09.696933969 +0200
@@ -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
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid unconditional debugging printf in res_query.c
2004-08-12 14:46 [PATCH] Avoid unconditional debugging printf in res_query.c Jakub Jelinek
@ 2004-08-12 17:37 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-08-12 17:37 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
Applied.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-12 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 14:46 [PATCH] Avoid unconditional debugging printf in res_query.c Jakub Jelinek
2004-08-12 17:37 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).