diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-26 10:36:52 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-01 18:20:24 +0100 |
commit | fff501a3393b459c512ec155e2d2cd935e7885a2 (patch) | |
tree | 625ea119195475e2680ba7f1be1c73b2a31a0684 /sdext | |
parent | af843af4c816ef25246c815e187729ec25b2f000 (diff) |
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I38f3e3243f8cb891c9a0fe2f4c68bc76acd1ef44
Reviewed-on: https://gerrit.libreoffice.org/64020
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/test/pdfunzip.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index 17807af628d6..ca7e5afa0b1a 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -311,9 +311,8 @@ static int write_addStreams( const char* pInFile, const char* pOutFile, PDFFile* static int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFFile ) { - int nRet = 0; unsigned int nElements = i_pPDFFile->m_aSubElements.size(); - for( unsigned i = 0; i < nElements && nRet == 0; i++ ) + for (unsigned i = 0; i < nElements; i++) { // search FontDescriptors PDFObject* pObj = dynamic_cast<PDFObject*>(i_pPDFFile->m_aSubElements[i].get()); @@ -390,16 +389,15 @@ static int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* aContext.m_bDecrypt = i_pPDFFile->isEncrypted(); pStream->writeStream( aContext, i_pPDFFile ); } - return nRet; + return 0; } static std::vector< std::pair< sal_Int32, sal_Int32 > > s_aEmitObjects; static int write_objects( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFFile ) { - int nRet = 0; unsigned int nElements = s_aEmitObjects.size(); - for( unsigned i = 0; i < nElements && nRet == 0; i++ ) + for (unsigned i = 0; i < nElements; i++) { sal_Int32 nObject = s_aEmitObjects[i].first; sal_Int32 nGeneration = s_aEmitObjects[i].second; @@ -419,7 +417,7 @@ static int write_objects( const char* i_pInFile, const char* i_pOutFile, PDFFile aContext.m_bDecrypt = i_pPDFFile->isEncrypted(); pStream->writeStream( aContext, i_pPDFFile ); } - return nRet; + return 0; } SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) |