diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 14:55:29 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-03 14:13:57 +0100 |
commit | 2a3f5d11522cd69f0ce221cde3a63b7e85e94b53 (patch) | |
tree | 51a9483a42769f64fff5b329af6604cdf5a5f7ff /comphelper/source | |
parent | e73bf95c00168bbf7d312cd11c40d0581ebd928e (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I856345576ff5c10a41509a97ad4539272bd55568
Reviewed-on: https://gerrit.libreoffice.org/62803
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/backupfilehelper.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 8a107e891577..315fccb1c501 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -1474,24 +1474,21 @@ namespace // write number of entries if (write_sal_uInt32(aHandle, nSize)) { - if (bRetval) - { - // write placeholder for headers. Due to the fact that - // PackFileSize for newly added files gets set during - // writing the content entry, write headers after content - // is written. To do so, write placeholders here - sal_uInt32 nWriteSize(0); + // write placeholder for headers. Due to the fact that + // PackFileSize for newly added files gets set during + // writing the content entry, write headers after content + // is written. To do so, write placeholders here + sal_uInt32 nWriteSize(0); - nWriteSize += maPackedFileEntryVector.size() * PackedFileEntry::getEntrySize(); + nWriteSize += maPackedFileEntryVector.size() * PackedFileEntry::getEntrySize(); - aArray[0] = aArray[1] = aArray[2] = aArray[3] = 0; + aArray[0] = aArray[1] = aArray[2] = aArray[3] = 0; - for (sal_uInt32 a(0); bRetval && a < nWriteSize; a++) + for (sal_uInt32 a(0); bRetval && a < nWriteSize; a++) + { + if (osl_File_E_None != osl_writeFile(aHandle, static_cast<const void*>(aArray), 1, &nBaseWritten) || 1 != nBaseWritten) { - if (osl_File_E_None != osl_writeFile(aHandle, static_cast<const void*>(aArray), 1, &nBaseWritten) || 1 != nBaseWritten) - { - bRetval = false; - } + bRetval = false; } } |