diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-26 14:47:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-27 08:42:53 +0200 |
commit | 8dca2d5ac740f262b045f6529bd8e97af0ec9c47 (patch) | |
tree | e984203a66a5fb178b08341e53fab913a7af7d53 /store | |
parent | 513ac8eb79e45de332d7ddab5b27c70578b904f1 (diff) |
loplugin:oncevar in starmath..svl
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c
Reviewed-on: https://gerrit.libreoffice.org/39280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'store')
-rw-r--r-- | store/source/stordata.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx index 01822cd44e56..a2c992b983d6 100644 --- a/store/source/stordata.cxx +++ b/store/source/stordata.cxx @@ -1015,8 +1015,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_DIRECT) { // Truncate direct data pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::directCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::directCount; i > nRemain; i--) { // Obtain data page location. sal_uInt32 nAddr = directLink (i - 1); @@ -1038,8 +1037,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_SINGLE) { // Truncate single indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::singleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::singleCount; i > nRemain; i--) { // Truncate single indirect page to zero data pages. eErrCode = store_truncate_Impl (singleLink (i - 1), 0, rBIOS); @@ -1057,8 +1055,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_DOUBLE) { // Truncate double indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::doubleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::doubleCount; i > nRemain; i--) { // Truncate double indirect page to zero single indirect pages. eErrCode = store_truncate_Impl (doubleLink (i - 1), 0, 0, rBIOS); @@ -1076,8 +1073,7 @@ storeError OStoreDirectoryPageObject::truncate ( if (eScope == page::SCOPE_TRIPLE) { // Truncate triple indirect pages. - sal_uInt16 i, n = OStoreDirectoryDataBlock::tripleCount; - for (i = n; i > nRemain; i--) + for (sal_uInt16 i = OStoreDirectoryDataBlock::tripleCount; i > nRemain; i--) { // Truncate to zero double indirect pages. eErrCode = store_truncate_Impl (tripleLink (i - 1), 0, 0, 0, rBIOS); |