summaryrefslogtreecommitdiff
path: root/store/source/stordata.cxx
diff options
context:
space:
mode:
authorMichaël Lefèvre <lefevre00@yahoo.fr>2014-04-07 11:44:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-12 11:32:38 +0200
commit70e744b2157ebe48f3a5c839560fedf6521d0464 (patch)
tree4e29618cc5a36f25557bd130226abdfe96e46848 /store/source/stordata.cxx
parentd1516d488c081ec3a5d730d2b1626a0c8dc39a73 (diff)
fdo#43157 Remove OSL_POSTCOND, prefer SAL_WARN_IF
Change-Id: Ia89a2dce799c7ba90bcd19919195bfd2c7a4a180 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'store/source/stordata.cxx')
-rw-r--r--store/source/stordata.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx
index f16c4226a52e..2b8d723290ab 100644
--- a/store/source/stordata.cxx
+++ b/store/source/stordata.cxx
@@ -20,6 +20,7 @@
#include "stordata.hxx"
#include "sal/types.h"
+#include "sal/log.hxx"
#include "osl/diagnose.h"
#include "store/types.h"
@@ -624,9 +625,11 @@ OStoreDirectoryPageObject::scope (
// Verify reduction.
n = index1 * nCapacity + index0;
- OSL_POSTCOND(n == nPage, "wrong math on indirect indices");
if (n != nPage)
+ {
+ SAL_WARN("store", "wrong math on indirect indices");
return page::SCOPE_UNKNOWN;
+ }
// Setup LinkDescriptor indices.
rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff);
@@ -656,9 +659,11 @@ OStoreDirectoryPageObject::scope (
// Verify reduction.
n = index2 * nCapacity * nCapacity +
index1 * nCapacity + index0;
- OSL_POSTCOND(n == nPage, "wrong math on double indirect indices");
if (n != nPage)
+ {
+ SAL_WARN("store", "wrong math on double indirect indices");
return page::SCOPE_UNKNOWN;
+ }
// Setup LinkDescriptor indices.
rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff);
@@ -694,9 +699,11 @@ OStoreDirectoryPageObject::scope (
n = index3 * nCapacity * nCapacity * nCapacity +
index2 * nCapacity * nCapacity +
index1 * nCapacity + index0;
- OSL_POSTCOND(n == nPage, "wrong math on triple indirect indices");
if (n != nPage)
+ {
+ SAL_WARN("store", "wrong math on triple indirect indices");
return page::SCOPE_UNKNOWN;
+ }
// Setup LinkDescriptor indices.
rDescr.m_nIndex0 = (sal_uInt16)(index0 & 0xffff);