diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-04-11 20:00:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-11 23:08:11 +0200 |
commit | e98e738a82885b6e7fb643bf407e504fe095803e (patch) | |
tree | 88cd7e8feddf736a7672a2d73349f5df07e65d68 /tools/source | |
parent | e02a6cb2c3e2b23b203b422e4e0680877f232636 (diff) |
replace some SvStream seeking with calls to remainingSize()
Change-Id: I2905e98425b9991d6138ab0adc15083d313ca445
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/zcodec/zcodec.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index ab50640092ce..ed6d8e4d5a08 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -284,11 +284,8 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize { nInToRead = (mnInBufSize > mnInToRead) ? mnInToRead : mnInBufSize; - sal_uIntPtr nStreamPos = rIStm.Tell(); - rIStm.Seek( STREAM_SEEK_TO_END ); - sal_uIntPtr nMaxPos = rIStm.Tell(); - rIStm.Seek( nStreamPos ); - if ( ( nMaxPos - nStreamPos ) < nInToRead ) + sal_uInt64 const nRemaining = rIStm.remainingSize(); + if (nRemaining < nInToRead) { rIStm.SetError( ERRCODE_IO_PENDING ); err= int(!Z_STREAM_END); // TODO What is appropriate code for this? |