https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a1484597041c5f0d8561…
commit 5a1484597041c5f0d8561a49fe0d1db0497187fe
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Fri Oct 27 23:47:30 2017 +0100
[MSAFD] Properly define SockAsyncThread() and avoid the cast. CORE-11799 (#94)
---
dll/win32/msafd/misc/dllmain.c | 6 ++++--
dll/win32/msafd/msafd.h | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dll/win32/msafd/misc/dllmain.c b/dll/win32/msafd/misc/dllmain.c
index 45a1d17df1..c2ee828b08 100644
--- a/dll/win32/msafd/misc/dllmain.c
+++ b/dll/win32/msafd/misc/dllmain.c
@@ -3524,7 +3524,7 @@ BOOLEAN SockCreateOrReferenceAsyncThread(VOID)
/* Create the Async Thread */
hAsyncThread = CreateThread(NULL,
0,
- (LPTHREAD_START_ROUTINE)SockAsyncThread,
+ SockAsyncThread,
NULL,
0,
&AsyncThreadId);
@@ -3537,7 +3537,9 @@ BOOLEAN SockCreateOrReferenceAsyncThread(VOID)
return TRUE;
}
-int SockAsyncThread(PVOID ThreadParam)
+ULONG
+NTAPI
+SockAsyncThread(PVOID ThreadParam)
{
PVOID AsyncContext;
PASYNC_COMPLETION_ROUTINE AsyncCompletionRoutine;
diff --git a/dll/win32/msafd/msafd.h b/dll/win32/msafd/msafd.h
index fa3396ed00..1b8d3cf463 100644
--- a/dll/win32/msafd/msafd.h
+++ b/dll/win32/msafd/msafd.h
@@ -454,7 +454,9 @@ int CreateContext(
PSOCKET_INFORMATION Socket
);
-int SockAsyncThread(
+ULONG
+NTAPI
+SockAsyncThread(
PVOID ThreadParam
);