Author: hbelusca
Date: Tue Dec 11 01:45:49 2012
New Revision: 57867
URL:
http://svn.reactos.org/svn/reactos?rev=57867&view=rev
Log:
[CONSRV]
However here, we must keep the incrementation at the end of the loop, because of a
possible corner case (a loop-break which takes place when we reach the last element of the
list, but NextEntry already points to its head because of the cyclicity of the list) with
the following 'if'-test made just after the loop.
Modified:
branches/ros-csrss/subsystems/win32/csrsrv/procsup.c
branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c
Modified: branches/ros-csrss/subsystems/win32/csrsrv/procsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
==============================================================================
--- branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win32/csrsrv/procsup.c [iso-8859-1] Tue Dec 11 01:45:49
2012
@@ -1118,7 +1118,7 @@
CsrLockedReferenceProcess(CurrentProcess);
*CsrProcess = CurrentProcess;
}
-
+
/* Return the result */
return Status;
}
Modified: branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
==============================================================================
--- branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c [iso-8859-1] (original)
+++ branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c [iso-8859-1] Tue Dec 11 01:45:49
2012
@@ -970,9 +970,6 @@
/* Get the Process */
CurrentThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks);
- /* Move to the next entry */
- NextEntry = NextEntry->Flink;
-
/* Check for PID Match */
if ((CurrentThread->ClientId.UniqueThread == Tid) &&
!(CurrentThread->Flags & CsrThreadTerminated))
@@ -980,6 +977,9 @@
/* Get out of here */
break;
}
+
+ /* Move to the next entry */
+ NextEntry = NextEntry->Flink;
}
/* Nothing found if we got back to the list */