Commit c0fca0a1 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Avoid overwriting the result of the async I/O callback in NtFsControlFile.

parent ad3faa82
......@@ -941,9 +941,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
if (!event && io->u.Status == STATUS_PENDING)
{
do
io->u.Status = NtWaitForSingleObject(internal_event, TRUE, NULL);
while(io->u.Status == STATUS_USER_APC);
while (NtWaitForSingleObject(internal_event, TRUE, NULL) == STATUS_USER_APC) /*nothing*/ ;
}
if (internal_event) NtClose(internal_event);
}
......@@ -975,9 +973,7 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
if (!event && io->u.Status == STATUS_PENDING)
{
do
io->u.Status = NtWaitForSingleObject(internal_event, TRUE, NULL);
while(io->u.Status == STATUS_USER_APC);
while (NtWaitForSingleObject(internal_event, TRUE, NULL) == STATUS_USER_APC) /*nothing*/ ;
}
if (internal_event) NtClose(internal_event);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment