summaryrefslogtreecommitdiff
path: root/registry/source/registry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'registry/source/registry.cxx')
-rw-r--r--registry/source/registry.cxx8
1 files changed, 2 insertions, 6 deletions
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;