Welcome! Log In Create A New Profile

Advanced

[nginx] Win32: fixed wrong type cast.

Maxim Dounin
October 13, 2014 08:20PM
details: http://hg.nginx.org/nginx/rev/de7ec5eef6d2
branches:
changeset: 5872:de7ec5eef6d2
user: Kouhei Sutou <kou@cozmixng.org>
date: Sat Oct 11 20:56:35 2014 +0900
description:
Win32: fixed wrong type cast.

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.

diffstat:

src/event/modules/ngx_iocp_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c
--- a/src/event/modules/ngx_iocp_module.c
+++ b/src/event/modules/ngx_iocp_module.c
@@ -247,7 +247,7 @@ ngx_int_t ngx_iocp_process_events(ngx_cy

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) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Win32: fixed wrong type cast.

Maxim Dounin 652 October 13, 2014 08:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready