summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
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;