From f6c9dd8a13969db5ca90a655d4309a14ca98a2a9 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Tue, 29 May 2012 22:10:14 +0000 Subject: reduce zlib warnings to when there really is something failing --- ot_fullscrape.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ot_fullscrape.c') diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 583f847..f50d719 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c @@ -105,7 +105,8 @@ static int fullscrape_increase( int *iovec_entries, struct iovec **iovector, *re -= OT_SCRAPE_MAXENTRYLEN; strm->next_out = (uint8_t*)*r; strm->avail_out = OT_SCRAPE_CHUNK_SIZE; - if( deflate( strm, zaction ) < Z_OK ) + zres = deflate( strm, zaction ); + if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) ) fprintf( stderr, "deflate() failed while in fullscrape_increase(%d).\n", zaction ); *r = (char*)strm->next_out; } @@ -191,9 +192,11 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas #ifdef WANT_COMPRESSION_GZIP if( mode & TASK_FLAG_GZIP ) { + int zres; strm.next_in = (uint8_t*)compress_buffer; strm.avail_in = r - compress_buffer; - if( deflate( &strm, Z_NO_FLUSH ) < Z_OK ) + zres = deflate( &strm, Z_NO_FLUSH ); + if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) ) fprintf( stderr, "deflate() failed while in fullscrape_make().\n" ); r = (char*)strm.next_out; } -- cgit v1.2.3