Alexandre Julliard : ntdll: Avoid overwriting the result of the async
I/ O callback in NtFsControlFile.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 23 08:36:27 CDT 2007
Module: wine
Branch: master
Commit: c0fca0a186acc004afcdad74e9c7b3e453a0140a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0fca0a186acc004afcdad74e9c7b3e453a0140a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Mar 23 14:02:13 2007 +0100
ntdll: Avoid overwriting the result of the async I/O callback in NtFsControlFile.
---
dlls/ntdll/file.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index dafe7aa..45786b0 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -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);
}
More information about the wine-cvs
mailing list