summaryrefslogtreecommitdiff
path: root/store/source/lockbyte.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-30 09:45:30 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-04-30 13:39:32 +0200
commit9fe1b7c53df5cb3a612ab30866437ced0a406fd0 (patch)
treeadc5186f49b73a67b9353d79e0a0756e1e5d4ba6 /store/source/lockbyte.cxx
parenta6f52af75780ae28e4dc12f564ce3eb6d9c14b91 (diff)
WaE: C6011 Dereferencing NULL pointer warnings
upgrade to asserts Change-Id: Iaf4ad07b87496e2e2039e01a4e5ceb6128cdd012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166919 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'store/source/lockbyte.cxx')
-rw-r--r--store/source/lockbyte.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index 87aefdbe4185..c89a3e2ff741 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -372,7 +372,7 @@ storeError FileLockBytes::readPageAt_Impl (std::shared_ptr<PageData> & rPage, sa
storeError FileLockBytes::writePageAt_Impl (std::shared_ptr<PageData> const & rPage, sal_uInt32 nOffset)
{
PageData const * pagedata = rPage.get();
- OSL_PRECOND(pagedata != nullptr, "contract violation");
+ assert(pagedata != nullptr && "contract violation");
return writeAt_Impl (nOffset, pagedata, pagedata->size());
}
@@ -716,7 +716,7 @@ storeError MemoryLockBytes::readPageAt_Impl (std::shared_ptr<PageData> & rPage,
storeError MemoryLockBytes::writePageAt_Impl (std::shared_ptr<PageData> const & rPage, sal_uInt32 nOffset)
{
PageData const * pagedata = rPage.get();
- OSL_PRECOND(!(pagedata == nullptr), "contract violation");
+ assert(pagedata != nullptr && "contract violation");
return writeAt_Impl (nOffset, pagedata, pagedata->size());
}