From 6e92f49be13876850767bae9bf88539a0642eb5b Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 11 Sep 2017 17:17:37 +0200 Subject: [PATCH] afd: name afd_poll() arguments more clearly --- src/afd.c | 14 ++++++++------ src/afd.h | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/afd.c b/src/afd.c index 0d53174..bfd68c3 100644 --- a/src/afd.c +++ b/src/afd.c @@ -12,7 +12,9 @@ #define IOCTL_AFD_POLL _AFD_CONTROL_CODE(AFD_POLL, METHOD_BUFFERED) -int afd_poll(SOCKET socket, AFD_POLL_INFO* info, OVERLAPPED* overlapped) { +int afd_poll(SOCKET driver_socket, + AFD_POLL_INFO* poll_info, + OVERLAPPED* overlapped) { IO_STATUS_BLOCK iosb; IO_STATUS_BLOCK* iosb_ptr; HANDLE event = NULL; @@ -42,16 +44,16 @@ int afd_poll(SOCKET socket, AFD_POLL_INFO* info, OVERLAPPED* overlapped) { } iosb_ptr->Status = STATUS_PENDING; - status = NtDeviceIoControlFile((HANDLE) socket, + status = NtDeviceIoControlFile((HANDLE) driver_socket, event, NULL, apc_context, iosb_ptr, IOCTL_AFD_POLL, - info, - sizeof *info, - info, - sizeof *info); + poll_info, + sizeof *poll_info, + poll_info, + sizeof *poll_info); if (overlapped == NULL) { /* If this is a blocking operation, wait for the event to become diff --git a/src/afd.h b/src/afd.h index 0403d95..01a0a82 100644 --- a/src/afd.h +++ b/src/afd.h @@ -51,8 +51,8 @@ typedef struct _AFD_POLL_INFO { AFD_POLL_HANDLE_INFO Handles[1]; } AFD_POLL_INFO, *PAFD_POLL_INFO; -EPOLL_INTERNAL int afd_poll(SOCKET socket, - AFD_POLL_INFO* info, +EPOLL_INTERNAL int afd_poll(SOCKET driver_socket, + AFD_POLL_INFO* poll_info, OVERLAPPED* overlapped); /* clang-format off */