Author: hbelusca Date: Sat Jan 26 23:56:07 2013 New Revision: 58236
URL: http://svn.reactos.org/svn/reactos?rev=58236&view=rev Log: [SMSS] Clarify a bit the code. No logical changes.
Modified: trunk/reactos/base/system/smss/sminit.c trunk/reactos/base/system/smss/smsubsys.c
Modified: trunk/reactos/base/system/smss/sminit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/sminit.c?r... ============================================================================== --- trunk/reactos/base/system/smss/sminit.c [iso-8859-1] (original) +++ trunk/reactos/base/system/smss/sminit.c [iso-8859-1] Sat Jan 26 23:56:07 2013 @@ -463,15 +463,17 @@ IN PVOID EntryContext) { /* Check which value is being set */ - if (_wcsicmp(ValueName, L"DllDirectory")) + if (_wcsicmp(ValueName, L"DllDirectory") == 0) + { + /* This is the directory, initialize it */ + DPRINT("KnownDll Path: %S\n", ValueData); + return SmpInitializeKnownDllPath(&SmpKnownDllPath, ValueData, ValueLength); + } + else { /* Add to the linked list -- this is a file */ return SmpSaveRegistryValue(EntryContext, ValueName, ValueData, TRUE); } - - /* This is the directory, initialize it */ - DPRINT("KnownDll Path: %S\n", ValueData); - return SmpInitializeKnownDllPath(&SmpKnownDllPath, ValueData, ValueLength); }
NTSTATUS @@ -499,7 +501,7 @@ }
/* Check if the path is being set, and wait for the second instantiation */ - if (!(_wcsicmp(ValueName, L"Path")) && (++SmpCalledConfigEnv == 2)) + if ((_wcsicmp(ValueName, L"Path") == 0) && (++SmpCalledConfigEnv == 2)) { /* Allocate the path buffer */ SmpDefaultLibPathBuffer = RtlAllocateHeap(RtlGetProcessHeap(), @@ -528,12 +530,12 @@ PSMP_REGISTRY_VALUE RegEntry; PWCHAR SubsystemName;
- /* Is this a required or optional subsystem */ - if ((_wcsicmp(ValueName, L"Required")) && - (_wcsicmp(ValueName, L"Optional"))) + /* Is this a required or optional subsystem? */ + if ((_wcsicmp(ValueName, L"Required") != 0) && + (_wcsicmp(ValueName, L"Optional") != 0)) { /* It isn't, is this the PSI flag? */ - if ((_wcsicmp(ValueName, L"PosixSingleInstance")) || + if ((_wcsicmp(ValueName, L"PosixSingleInstance") != 0) || (ValueType != REG_DWORD)) { /* It isn't, must be a subsystem entry, add it to the list */ @@ -567,17 +569,17 @@ RemoveEntryList(&RegEntry->Entry);
/* Figure out which list to put it in */ - if (_wcsicmp(ValueName, L"Required")) + if (_wcsicmp(ValueName, L"Required") == 0) + { + /* Put it into the required list */ + DPRINT("Required\n"); + InsertTailList(&SmpSubSystemsToLoad, &RegEntry->Entry); + } + else { /* Put it into the optional list */ DPRINT("Optional\n"); InsertTailList(&SmpSubSystemsToDefer, &RegEntry->Entry); - } - else - { - /* Put it into the required list */ - DPRINT("Required\n"); - InsertTailList(&SmpSubSystemsToLoad, &RegEntry->Entry); } }
Modified: trunk/reactos/base/system/smss/smsubsys.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smsubsys.c... ============================================================================== --- trunk/reactos/base/system/smss/smsubsys.c [iso-8859-1] (original) +++ trunk/reactos/base/system/smss/smsubsys.c [iso-8859-1] Sat Jan 26 23:56:07 2013 @@ -595,7 +595,7 @@ { /* Get each entry and check if it's the internal debug or not */ RegEntry = CONTAINING_RECORD(NextEntry, SMP_REGISTRY_VALUE, Entry); - if (_wcsicmp(RegEntry->Name.Buffer, L"debug") == 0) + if (_wcsicmp(RegEntry->Name.Buffer, L"Debug") == 0) { /* Load the internal debug system */ Status = SmpExecuteCommand(&RegEntry->Value,