From aac777cc7ff471e59725f08261f3f72e709399c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 17 Apr 2017 23:28:41 +0000 Subject: [PATCH] [CONCFG]: Use 'Success' boolean variable instead of an obscure 'RetVal'. svn path=/trunk/; revision=74367 --- reactos/win32ss/user/winsrv/concfg/settings.c | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/reactos/win32ss/user/winsrv/concfg/settings.c b/reactos/win32ss/user/winsrv/concfg/settings.c index 0b810c49cb9..2d26bfd544a 100644 --- a/reactos/win32ss/user/winsrv/concfg/settings.c +++ b/reactos/win32ss/user/winsrv/concfg/settings.c @@ -121,7 +121,7 @@ ConCfgOpenUserSettings(LPCWSTR ConsoleTitle, REGSAM samDesired, BOOLEAN Create) { - BOOLEAN RetVal = TRUE; + BOOLEAN Success = TRUE; NTSTATUS Status; WCHAR szBuffer[MAX_PATH] = L"Console\\"; WCHAR szBuffer2[MAX_PATH] = L""; @@ -164,35 +164,35 @@ ConCfgOpenUserSettings(LPCWSTR ConsoleTitle, if (Create) { /* Create the key */ - RetVal = (RegCreateKeyExW(hKey, - szBuffer, - 0, NULL, - REG_OPTION_NON_VOLATILE, - samDesired, - NULL, - hSubKey, - NULL) == ERROR_SUCCESS); + Success = (RegCreateKeyExW(hKey, + szBuffer, + 0, NULL, + REG_OPTION_NON_VOLATILE, + samDesired, + NULL, + hSubKey, + NULL) == ERROR_SUCCESS); } else { /* Open the key */ - RetVal = (RegOpenKeyExW(hKey, - szBuffer, - 0, - samDesired, - hSubKey) == ERROR_SUCCESS); + Success = (RegOpenKeyExW(hKey, + szBuffer, + 0, + samDesired, + hSubKey) == ERROR_SUCCESS); } /* Close the parent key and return success or not */ NtClose(hKey); - return RetVal; + return Success; } BOOLEAN ConCfgReadUserSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo, IN BOOLEAN DefaultSettings) { - BOOLEAN RetVal = FALSE; + BOOLEAN Success = FALSE; HKEY hKey; DWORD dwNumSubKeys = 0; DWORD dwIndex; @@ -251,99 +251,99 @@ ConCfgReadUserSettings(IN OUT PCONSOLE_STATE_INFO ConsoleInfo, if (dwColorIndex < ARRAYSIZE(ConsoleInfo->ColorTable)) { ConsoleInfo->ColorTable[dwColorIndex] = Value; - RetVal = TRUE; + Success = TRUE; } } if (!wcscmp(szValueName, L"FaceName")) { wcsncpy(ConsoleInfo->FaceName, szValue, LF_FACESIZE); ConsoleInfo->FaceName[LF_FACESIZE - 1] = UNICODE_NULL; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"FontFamily")) { ConsoleInfo->FontFamily = Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"FontSize")) { ConsoleInfo->FontSize.X = LOWORD(Value); // Width ConsoleInfo->FontSize.Y = HIWORD(Value); // Height - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"FontWeight")) { ConsoleInfo->FontWeight = Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"HistoryBufferSize")) { ConsoleInfo->HistoryBufferSize = Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"NumberOfHistoryBuffers")) { ConsoleInfo->NumberOfHistoryBuffers = Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"HistoryNoDup")) { ConsoleInfo->HistoryNoDup = !!Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"QuickEdit")) { ConsoleInfo->QuickEdit = !!Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"InsertMode")) { ConsoleInfo->InsertMode = !!Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"ScreenBufferSize")) { ConsoleInfo->ScreenBufferSize.X = LOWORD(Value); ConsoleInfo->ScreenBufferSize.Y = HIWORD(Value); - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"FullScreen")) { ConsoleInfo->FullScreen = Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"WindowPosition")) { ConsoleInfo->AutoPosition = FALSE; ConsoleInfo->WindowPosition.x = LOWORD(Value); ConsoleInfo->WindowPosition.y = HIWORD(Value); - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"WindowSize")) { ConsoleInfo->WindowSize.X = LOWORD(Value); ConsoleInfo->WindowSize.Y = HIWORD(Value); - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"CursorSize")) { ConsoleInfo->CursorSize = min(max(Value, 0), 100); - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"ScreenColors")) { ConsoleInfo->ScreenAttributes = (USHORT)Value; - RetVal = TRUE; + Success = TRUE; } else if (!wcscmp(szValueName, L"PopupColors")) { ConsoleInfo->PopupAttributes = (USHORT)Value; - RetVal = TRUE; + Success = TRUE; } } RegCloseKey(hKey); - return RetVal; + return Success; } BOOLEAN