diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-12-29 00:15:44 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-12-29 00:15:44 -0800 |
commit | 19761b8506f15d6eeeb6ccfab33a11abce0f40e7 (patch) | |
tree | cdc30a695e75ce713f6688b0c95c1cb411e2e55c /deflate.c | |
parent | 9d55abc96968db80749df5ebf412d36e2d66de26 (diff) | |
download | zlib-19761b8506f15d6eeeb6ccfab33a11abce0f40e7.tar.gz |
Permit Z_NULL arguments to deflatePending.
This avoids having to create useless variables for return values
that aren't needed.
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -451,8 +451,10 @@ int ZEXPORT deflatePending (strm, pending, bits) z_streamp strm; { if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - *pending = strm->state->pending; - *bits = strm->state->bi_valid; + if (pending != Z_NULL) + *pending = strm->state->pending; + if (bits != Z_NULL) + *bits = strm->state->bi_valid; return Z_OK; } |