summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 21:27:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-14 08:29:08 +0200
commit8f59317223e0b8e1e5e6e4145b6ee457fe9e15f3 (patch)
tree4ed567d87c66931572848ceeae1004a6f237bc3e /store
parent2e3b0c5d42d60d46cd9f8b8eda9424b095c63418 (diff)
loplugin:sequentialassign in starmath..svl
Change-Id: I95d7b67cd8b6b68c087ff96fdb6bb283ab8b49ec Reviewed-on: https://gerrit.libreoffice.org/70718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'store')
-rw-r--r--store/source/storbase.hxx6
-rw-r--r--store/source/storbios.cxx6
-rw-r--r--store/source/stordata.hxx18
-rw-r--r--store/source/stortree.hxx6
4 files changed, 12 insertions, 24 deletions
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 5ced6d255c4e..0c21acbb3ad3 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -366,8 +366,7 @@ struct PageData
*/
void guard (sal_uInt32 nAddr)
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
m_aDescr.m_nAddr = store::htonl(nAddr);
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
@@ -377,8 +376,7 @@ struct PageData
*/
storeError verify (sal_uInt32 nAddr) const
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index b1bac9852938..93e47d700841 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -117,8 +117,7 @@ struct OStoreSuperBlock
*/
void guard()
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -131,8 +130,7 @@ struct OStoreSuperBlock
if (nMagic != STORE_MAGIC_SUPERBLOCK)
return store_E_WrongFormat;
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aDescr, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 35fe20c0729a..4e4741d509d7 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -172,8 +172,7 @@ struct OStoreIndirectionPageData : public store::PageData
*/
void guard()
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -182,8 +181,7 @@ struct OStoreIndirectionPageData : public store::PageData
*/
storeError verify() const
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
@@ -299,8 +297,7 @@ struct OStorePageNameBlock
*/
void guard()
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -309,8 +306,7 @@ struct OStorePageNameBlock
*/
storeError verify() const
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aKey, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
@@ -398,8 +394,7 @@ struct OStoreDirectoryDataBlock
*/
void guard()
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize - sizeof(G)));
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -408,8 +403,7 @@ struct OStoreDirectoryDataBlock
*/
storeError verify() const
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, &m_aTable, static_cast<sal_uInt32>(theSize - sizeof(G)));
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;
diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx
index 547f548c3a95..9eb02b1329f1 100644
--- a/store/source/stortree.hxx
+++ b/store/source/stortree.hxx
@@ -142,8 +142,7 @@ struct OStoreBTreeNodeData : public store::PageData
*/
void guard()
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
m_aGuard.m_nCRC32 = store::htonl(nCRC32);
}
@@ -152,8 +151,7 @@ struct OStoreBTreeNodeData : public store::PageData
*/
storeError verify() const
{
- sal_uInt32 nCRC32 = 0;
- nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
+ sal_uInt32 nCRC32 = rtl_crc32 (0, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
nCRC32 = rtl_crc32 (nCRC32, m_pData, capacity());
if (m_aGuard.m_nCRC32 != store::htonl(nCRC32))
return store_E_InvalidChecksum;