- Fix uninitialized return value when the list is empty
- Fix a horrible bug where the end of the list wasnt checked by the source list but the destination list 
- Found by Amine Khaldi

svn path=/trunk/; revision=42607
This commit is contained in:
Johannes Anderwald 2009-08-11 09:20:15 +00:00
parent 85543388b1
commit fad9ff3860

View file

@ -1075,7 +1075,7 @@ KsMoveIrpsOnCancelableQueue(
KIRQL OldLevel; KIRQL OldLevel;
PLIST_ENTRY SrcEntry; PLIST_ENTRY SrcEntry;
PIRP Irp; PIRP Irp;
NTSTATUS Status; NTSTATUS Status = STATUS_SUCCESS;
if (!DestinationLock) if (!DestinationLock)
{ {
@ -1111,7 +1111,7 @@ KsMoveIrpsOnCancelableQueue(
SrcEntry = SrcEntry->Blink; SrcEntry = SrcEntry->Blink;
} }
if (SrcEntry == DestinationList) if (SrcEntry == SourceList)
{ {
/* eof list reached */ /* eof list reached */
break; break;