summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-27 03:16:18 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-27 09:23:52 +0200
commitdc1858783e72bba808dbd87b5b03d5170449ad52 (patch)
tree5164686a8f38e64420f79b027900507d2c179a6d /registry
parent5690acdb44e8017055bb88e86e19d207836bb95c (diff)
tdf#120703 (PVS): V519 The variable is assigned values twice successively
Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/keyimpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index a717c5df6764..508d36ea3a66 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -161,8 +161,8 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
sal_uInt32 nSubKeys = pKey->countSubKeys();
*pnSubKeys = nSubKeys;
- rtl_uString** pSubKeys = nullptr;
- pSubKeys = static_cast<rtl_uString**>(rtl_allocateZeroMemory(nSubKeys * sizeof(rtl_uString*)));
+ rtl_uString** pSubKeys
+ = static_cast<rtl_uString**>(rtl_allocateZeroMemory(nSubKeys * sizeof(rtl_uString*)));
OStoreDirectory::iterator iter;
OStoreDirectory rStoreDir(pKey->getStoreDir());