summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-01-07 20:12:40 +0100
committerPetr Mladek <pmladek@suse.cz>2011-01-07 20:12:40 +0100
commit46bf8d4d5e0e45ce632330289516db4af4729d33 (patch)
treef8222deabd950cda963c3649fcce13733634411c
parentf2d22b6bb9c7cbd7573f23b116c2082224b4f0fd (diff)
Micro optimization of the last commit
nBufSize was set by aBuffer.getLength() and had not been used in the end
-rw-r--r--package/source/zipapi/ZipFile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index c99c9653e..7a1b5d964 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -853,7 +853,7 @@ sal_Int32 ZipFile::recover()
// the buffer should contain at least one header,
// or if it is end of the file, at least the postheader with sizes and hash
while( nPos < nBufSize - 30
- || ( aBuffer.getLength() < nToRead && nPos < nBufSize - 16 ) )
+ || ( nBufSize < nToRead && nPos < nBufSize - 16 ) )
{
if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 )