aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/ZlibOutStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/ZlibOutStream.cxx')
-rw-r--r--common/rdr/ZlibOutStream.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx
index 99d0617a..f102980a 100644
--- a/common/rdr/ZlibOutStream.cxx
+++ b/common/rdr/ZlibOutStream.cxx
@@ -109,7 +109,7 @@ size_t ZlibOutStream::overrun(size_t itemSize, size_t nItems)
checkCompressionLevel();
- while ((size_t)(end - ptr) < itemSize) {
+ while (avail() < itemSize) {
zs->next_in = start;
zs->avail_in = ptr - start;
@@ -131,7 +131,7 @@ size_t ZlibOutStream::overrun(size_t itemSize, size_t nItems)
}
size_t nAvail;
- nAvail = (end - ptr) / itemSize;
+ nAvail = avail() / itemSize;
if (nAvail < nItems)
return nAvail;
@@ -151,7 +151,7 @@ void ZlibOutStream::deflate(int flush)
do {
underlying->check(1);
zs->next_out = underlying->getptr();
- zs->avail_out = underlying->getend() - underlying->getptr();
+ zs->avail_out = underlying->avail();
#ifdef ZLIBOUT_DEBUG
vlog.debug("calling deflate, avail_in %d, avail_out %d",