diff options
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/keyimpl.cxx | 4 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 5 | ||||
-rw-r--r-- | registry/source/registry.cxx | 8 |
3 files changed, 5 insertions, 12 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index e76512e9e19a..437aa3114e10 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -146,15 +146,13 @@ RegError ORegKey::getKeyNames(const OUString& keyName, rtl_uString*** pSubKeyNames, sal_uInt32* pnSubKeys) { - RegError _ret = RegError::NO_ERROR; - *pSubKeyNames = nullptr; *pnSubKeys = 0; ORegKey* pKey = this; if (!keyName.isEmpty()) { - _ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey)); + RegError _ret = openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pKey)); if (_ret != RegError::NO_ERROR) return _ret; } diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 60d90faa9c6c..13b9d4251802 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -1018,8 +1018,6 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, } std::vector<sal_uInt8> aBuffer(VALUE_HEADERSIZE); - RegValueType valueType; - sal_uInt32 valueSize; sal_uInt32 rwBytes; OString targetPath(OUStringToOString(sTargetPath, RTL_TEXTENCODING_UTF8)); @@ -1027,7 +1025,8 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, (rwBytes == VALUE_HEADERSIZE)) { sal_uInt8 type = aBuffer[0]; - valueType = static_cast<RegValueType>(type); + RegValueType valueType = static_cast<RegValueType>(type); + sal_uInt32 valueSize; readUINT32(aBuffer.data() + VALUE_TYPEOFFSET, valueSize); if (valueType == RegValueType::BINARY) diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index 166354aa5d62..eb2a38f6ba5a 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -162,11 +162,9 @@ static RegError REGISTRY_CALLTYPE openRegistry(rtl_uString* registryName, static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg) { - ORegistry *pReg; - if (hReg) { - pReg = static_cast<ORegistry*>(hReg); + ORegistry *pReg = static_cast<ORegistry*>(hReg); if (!pReg->isOpen()) return RegError::REGISTRY_NOT_OPEN; @@ -192,11 +190,9 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg) static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg, rtl_uString* registryName) { - ORegistry *pReg; - if (hReg) { - pReg = static_cast<ORegistry*>(hReg); + ORegistry *pReg = static_cast<ORegistry*>(hReg); if (!pReg->isOpen()) return RegError::INVALID_REGISTRY; |