diff options
author | Petr Mladek <pmladek@suse.cz> | 2011-01-07 20:12:40 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-01-07 20:12:40 +0100 |
commit | 60ff78bdcfeef7713a3669cfe37e81e29f33f6aa (patch) | |
tree | 0a9fb79d50d8022653278ac725e9687392e7307e /package | |
parent | 7100d5b93b4f49ab36f9105bc112cadf55812a41 (diff) |
Micro optimization of the last commit
nBufSize was set by aBuffer.getLength() and had not been used in the end
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index e83d824c3d87..005d29196fd6 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 ) |