From 41bd8eff901c217c29c4832c1936b066143ab9c1 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Tue, 16 Apr 2002 13:48:35 -0400 Subject: Syntax seemed to be confusing according to the Bill --- Source/cmSystemTools.cxx | 18 ++++++++---------- 1 file 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; -- cgit v0.12