ntdll: Only wait on the completion port if no entries were returned.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-11-17 20:06:16 -06:00 committed by Alexandre Julliard
parent 247ae9838f
commit fbde01335f
1 changed files with 3 additions and 2 deletions

View File

@ -1371,9 +1371,10 @@ NTSTATUS WINAPI NtRemoveIoCompletionEx( HANDLE port, FILE_IO_COMPLETION_INFORMAT
if (i++ >= count) break;
}
if (i && ret == STATUS_PENDING)
if (i || ret != STATUS_PENDING)
{
ret = STATUS_SUCCESS;
if (ret == STATUS_PENDING)
ret = STATUS_SUCCESS;
break;
}