[PATCH 1/4] ntdll: Use correct parameter types instead of casting.

Alex Henrie alexhenrie24 at gmail.com
Tue Dec 29 23:37:56 CST 2015


Casting has not been necessary here ever since this code was converted
to use wineserver requests circa Wine 1.0.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/ntdll/file.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 1027b54..6524f32 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -411,10 +411,8 @@ static struct async_fileio *alloc_fileio( DWORD size, HANDLE handle, PIO_APC_ROU
 }
 
 /* callback for irp async I/O completion */
-static NTSTATUS irp_completion( void *user, IO_STATUS_BLOCK *io, NTSTATUS status, void **apc, void **arg )
+static NTSTATUS irp_completion( struct async_irp *async, IO_STATUS_BLOCK *io, NTSTATUS status, void **apc, void **arg )
 {
-    struct async_irp *async = user;
-
     if (status == STATUS_ALERTED)
     {
         SERVER_START_REQ( get_irp_result )
@@ -489,10 +487,9 @@ NTSTATUS FILE_GetNtStatus(void)
 /***********************************************************************
  *             FILE_AsyncReadService      (INTERNAL)
  */
-static NTSTATUS FILE_AsyncReadService( void *user, IO_STATUS_BLOCK *iosb,
+static NTSTATUS FILE_AsyncReadService( struct async_fileio_read *fileio, IO_STATUS_BLOCK *iosb,
                                        NTSTATUS status, void **apc, void **arg )
 {
-    struct async_fileio_read *fileio = user;
     int fd, needs_close, result;
 
     switch (status)
@@ -1097,10 +1094,9 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
 /***********************************************************************
  *             FILE_AsyncWriteService      (INTERNAL)
  */
-static NTSTATUS FILE_AsyncWriteService( void *user, IO_STATUS_BLOCK *iosb,
+static NTSTATUS FILE_AsyncWriteService( struct async_fileio_write *fileio, IO_STATUS_BLOCK *iosb,
                                         NTSTATUS status, void **apc, void **arg )
 {
-    struct async_fileio_write *fileio = user;
     int result, fd, needs_close;
     enum server_fd_type type;
 
@@ -1822,10 +1818,9 @@ struct read_changes_fileio
     char                data[1];
 };
 
-static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb,
+static NTSTATUS read_changes_apc( struct read_changes_fileio *fileio, IO_STATUS_BLOCK *iosb,
                                   NTSTATUS status, void **apc, void **arg )
 {
-    struct read_changes_fileio *fileio = user;
     int size = 0;
 
     if (status == STATUS_ALERTED)
-- 
2.6.4




More information about the wine-patches mailing list