summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2012-05-29 22:10:14 +0000
committererdgeist <>2012-05-29 22:10:14 +0000
commitf6c9dd8a13969db5ca90a655d4309a14ca98a2a9 (patch)
treeb7d432aa3db31a6c97618b99240045fadbe1877f
parent7d36ea2732bd7e39cc382b8cd93fedb8179fdd72 (diff)
reduce zlib warnings to when there really is something failing
-rw-r--r--ot_fullscrape.c7
1 files changed, 5 insertions, 2 deletions
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,
105 *re -= OT_SCRAPE_MAXENTRYLEN; 105 *re -= OT_SCRAPE_MAXENTRYLEN;
106 strm->next_out = (uint8_t*)*r; 106 strm->next_out = (uint8_t*)*r;
107 strm->avail_out = OT_SCRAPE_CHUNK_SIZE; 107 strm->avail_out = OT_SCRAPE_CHUNK_SIZE;
108 if( deflate( strm, zaction ) < Z_OK ) 108 zres = deflate( strm, zaction );
109 if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) )
109 fprintf( stderr, "deflate() failed while in fullscrape_increase(%d).\n", zaction ); 110 fprintf( stderr, "deflate() failed while in fullscrape_increase(%d).\n", zaction );
110 *r = (char*)strm->next_out; 111 *r = (char*)strm->next_out;
111 } 112 }
@@ -191,9 +192,11 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas
191 192
192#ifdef WANT_COMPRESSION_GZIP 193#ifdef WANT_COMPRESSION_GZIP
193 if( mode & TASK_FLAG_GZIP ) { 194 if( mode & TASK_FLAG_GZIP ) {
195 int zres;
194 strm.next_in = (uint8_t*)compress_buffer; 196 strm.next_in = (uint8_t*)compress_buffer;
195 strm.avail_in = r - compress_buffer; 197 strm.avail_in = r - compress_buffer;
196 if( deflate( &strm, Z_NO_FLUSH ) < Z_OK ) 198 zres = deflate( &strm, Z_NO_FLUSH );
199 if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) )
197 fprintf( stderr, "deflate() failed while in fullscrape_make().\n" ); 200 fprintf( stderr, "deflate() failed while in fullscrape_make().\n" );
198 r = (char*)strm.next_out; 201 r = (char*)strm.next_out;
199 } 202 }