summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/http.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-12-09 15:05:58 +0000
committerdes <des@FreeBSD.org>2001-12-09 15:05:58 +0000
commit01882c47bb851e08bc7ed425af7192785c3793f6 (patch)
tree2b229a831a4b180ab00cbb6f8d7655de18f025b3 /lib/libfetch/http.c
parenta9520ca9d77b610e2f10c5264c7615254dbb3e23 (diff)
downloadFreeBSD-src-01882c47bb851e08bc7ed425af7192785c3793f6.zip
FreeBSD-src-01882c47bb851e08bc7ed425af7192785c3793f6.tar.gz
Conditionalize some debugging code that didn't use the DEBUG macro.
MFC after: 1 week
Diffstat (limited to 'lib/libfetch/http.c')
-rw-r--r--lib/libfetch/http.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index d9fe15f..10c3a78 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -143,14 +143,16 @@ _http_new_chunk(struct cookie *c)
c->chunksize = c->chunksize * 16 + 10 + tolower(*p) - 'a';
#ifndef NDEBUG
- c->total += c->chunksize;
- if (c->chunksize == 0)
- fprintf(stderr, "\033[1m_http_fillbuf(): "
- "end of last chunk\033[m\n");
- else
- fprintf(stderr, "\033[1m_http_fillbuf(): "
- "new chunk: %lu (%lu)\033[m\n",
- (unsigned long)c->chunksize, (unsigned long)c->total);
+ if (fetchDebug) {
+ c->total += c->chunksize;
+ if (c->chunksize == 0)
+ fprintf(stderr, "\033[1m_http_fillbuf(): "
+ "end of last chunk\033[m\n");
+ else
+ fprintf(stderr, "\033[1m_http_fillbuf(): "
+ "new chunk: %lu (%lu)\033[m\n",
+ (unsigned long)c->chunksize, (unsigned long)c->total);
+ }
#endif
return c->chunksize;
OpenPOWER on IntegriCloud