]> git.kaiwu.me - nginx.git/commitdiff
Win32: fixed wrong type cast.
authorKouhei Sutou <kou@cozmixng.org>
Sat, 11 Oct 2014 11:56:35 +0000 (20:56 +0900)
committerKouhei Sutou <kou@cozmixng.org>
Sat, 11 Oct 2014 11:56:35 +0000 (20:56 +0900)
GetQueuedCompletionStatus() document on MSDN says the
following signature:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa364986.aspx

    BOOL WINAPI GetQueuedCompletionStatus(
      _In_   HANDLE CompletionPort,
      _Out_  LPDWORD lpNumberOfBytes,
      _Out_  PULONG_PTR lpCompletionKey,
      _Out_  LPOVERLAPPED *lpOverlapped,
      _In_   DWORD dwMilliseconds
    );

In the latest specification, the type of the third argument
(lpCompletionKey) is PULONG_PTR not LPDWORD.

src/event/modules/ngx_iocp_module.c

index 787e22d803eb2209b6da2279a69e930a9463e44a..75c5a517ba1e5a5ad2e3d9acb2a772c5c29571eb 100644 (file)
@@ -247,7 +247,7 @@ ngx_int_t ngx_iocp_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
 
     ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "iocp timer: %M", timer);
 
-    rc = GetQueuedCompletionStatus(iocp, &bytes, (LPDWORD) &key,
+    rc = GetQueuedCompletionStatus(iocp, &bytes, (PULONG_PTR) &key,
                                    (LPOVERLAPPED *) &ovlp, (u_long) timer);
 
     if (rc == 0) {