summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deflate.c6
-rw-r--r--zlib.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/deflate.c b/deflate.c
index 159e665..eed6ed8 100644
--- a/deflate.c
+++ b/deflate.c
@@ -451,8 +451,10 @@ int ZEXPORT deflatePending (strm, pending, bits)
451 z_streamp strm; 451 z_streamp strm;
452{ 452{
453 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; 453 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
454 *pending = strm->state->pending; 454 if (pending != Z_NULL)
455 *bits = strm->state->bi_valid; 455 *pending = strm->state->pending;
456 if (bits != Z_NULL)
457 *bits = strm->state->bi_valid;
456 return Z_OK; 458 return Z_OK;
457} 459}
458 460
diff --git a/zlib.h b/zlib.h
index 9ca20d7..20e13db 100644
--- a/zlib.h
+++ b/zlib.h
@@ -715,7 +715,8 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
715 been generated, but not yet provided in the available output. The bytes not 715 been generated, but not yet provided in the available output. The bytes not
716 provided would be due to the available output space having being consumed. 716 provided would be due to the available output space having being consumed.
717 The number of bits of output not provided are between 0 and 7, where they 717 The number of bits of output not provided are between 0 and 7, where they
718 await more bits to join them in order to fill out a full byte. 718 await more bits to join them in order to fill out a full byte. If pending
719 or bits are Z_NULL, then those values are not set.
719 720
720 deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source 721 deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
721 stream state was inconsistent. 722 stream state was inconsistent.