aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/TLSInStream.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-05-19 20:45:22 +0200
committerPierre Ossman <ossman@cendio.se>2020-05-21 11:34:22 +0200
commitb35ae29f932288b0529eb9eed21c31364a3489a4 (patch)
treed7c680494c170e6d9282dc51b2be1d05604f65ba /common/rdr/TLSInStream.cxx
parentdc38699af81e8bb953946000121f0a48cf30b962 (diff)
downloadtigervnc-b35ae29f932288b0529eb9eed21c31364a3489a4.tar.gz
tigervnc-b35ae29f932288b0529eb9eed21c31364a3489a4.zip
Add stream avail() methods
Makes it more readable to write code that needs to know how much data/space is available in a stream.
Diffstat (limited to 'common/rdr/TLSInStream.cxx')
-rw-r--r--common/rdr/TLSInStream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rdr/TLSInStream.cxx b/common/rdr/TLSInStream.cxx
index cd81f224..15e2a471 100644
--- a/common/rdr/TLSInStream.cxx
+++ b/common/rdr/TLSInStream.cxx
@@ -100,7 +100,7 @@ size_t TLSInStream::overrun(size_t itemSize, size_t nItems, bool wait)
}
size_t nAvail;
- nAvail = (end - ptr) / itemSize;
+ nAvail = avail() / itemSize;
if (nAvail < nItems)
return nAvail;