From cd21d25fc72411734ec8c8ba5cfe533740aedc88 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 12 Jul 2010 14:50:31 +0000 Subject: [PATCH] [LIB/RTL] - Get rid of some unneeded assignment, cast and a variable. svn path=/trunk/; revision=48005 --- reactos/lib/rtl/critical.c | 6 +++--- reactos/lib/rtl/path.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/reactos/lib/rtl/critical.c b/reactos/lib/rtl/critical.c index 7367c5efccf..2045c0e748c 100644 --- a/reactos/lib/rtl/critical.c +++ b/reactos/lib/rtl/critical.c @@ -65,9 +65,9 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection) } DPRINT("Created Event: %p \n", hNewEvent); - if ((hEvent = (HANDLE)_InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, - (PVOID)hNewEvent, - 0))) { + if (_InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore, + (PVOID)hNewEvent, + 0)) { /* Some just created an event */ DPRINT("Closing already created event: %p\n", hNewEvent); diff --git a/reactos/lib/rtl/path.c b/reactos/lib/rtl/path.c index 063f051548b..238d5c89b34 100644 --- a/reactos/lib/rtl/path.c +++ b/reactos/lib/rtl/path.c @@ -394,7 +394,6 @@ static ULONG get_full_path_helper( ULONG size) { ULONG reqsize = 0, mark = 0, dep = 0, deplen; - RTL_PATH_TYPE type; LPWSTR ins_str = NULL; LPCWSTR ptr; const UNICODE_STRING* cd; @@ -409,7 +408,7 @@ static ULONG get_full_path_helper( //cd = &((PCURDIR)&NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->CurrentDirectory.DosPath)->DosPath; cd = &NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->CurrentDirectory.DosPath; - switch (type = RtlDetermineDosPathNameType_U(name)) + switch (RtlDetermineDosPathNameType_U(name)) { case RtlPathTypeUncAbsolute: /* \\foo */ ptr = skip_unc_prefix( name );