summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-10-03 15:55:34 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-10-03 15:55:34 (GMT)
commit9c3b6549913ed7adc4f12a545ebb6005897f2058 (patch)
tree3193ce90e3f842bc3700e2025a198cca15553eb7
parent46c6442ce26edecb3827044e3dd0f7834f682faa (diff)
downloadCMake-9c3b6549913ed7adc4f12a545ebb6005897f2058.zip
CMake-9c3b6549913ed7adc4f12a545ebb6005897f2058.tar.gz
CMake-9c3b6549913ed7adc4f12a545ebb6005897f2058.tar.bz2
ENH: make sure value is set before using it
-rw-r--r--Source/kwsys/Registry.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index b410be7..dcfec52 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -212,13 +212,13 @@ bool Registry::ReadValue(const char *subkey,
const char *key,
const char **value)
{
- *value = 0;
bool res = false;
bool open = false;
if ( ! value )
{
return res;
}
+ *value = 0;
if ( !m_Opened )
{
if ( !this->Open(this->GetTopLevel(), subkey,