summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2002-04-16 17:48:35 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2002-04-16 17:48:35 (GMT)
commit41bd8eff901c217c29c4832c1936b066143ab9c1 (patch)
tree15867eb2a731b91e49237f666bc618db0201f1f7 /Source/cmSystemTools.cxx
parentebbcc3c97d1075169d72f371da78ca7df9d4ffe2 (diff)
downloadCMake-41bd8eff901c217c29c4832c1936b066143ab9c1.zip
CMake-41bd8eff901c217c29c4832c1936b066143ab9c1.tar.gz
CMake-41bd8eff901c217c29c4832c1936b066143ab9c1.tar.bz2
Syntax seemed to be confusing according to the Bill
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 822fb3f..5b96fc0 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -346,17 +346,15 @@ bool cmSystemTools::WriteRegistryValue(const char *key, const char *value)
{
return false;
}
- else
+
+ if(RegSetValueEx(hKey,
+ (LPTSTR)valuename.c_str(),
+ 0,
+ REG_SZ,
+ (CONST BYTE *)value,
+ (DWORD)(strlen(value) + 1)) == ERROR_SUCCESS)
{
- if(RegSetValueEx(hKey,
- (LPTSTR)valuename.c_str(),
- 0,
- REG_SZ,
- (CONST BYTE *)value,
- (DWORD)(strlen(value) + 1)) == ERROR_SUCCESS)
- {
- return true;
- }
+ return true;
}
#endif
return false;