Module: wine Branch: master Commit: 1a7cacc48949b9a4182539d7f7f2c0db32be7cee URL: https://gitlab.winehq.org/wine/wine/-/commit/1a7cacc48949b9a4182539d7f7f2c0d...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Nov 21 16:19:08 2022 +0100
ntdll: Use unsigned int instead of NTSTATUS in async callbacks.
To avoid typecasts in debug traces.
---
dlls/ntdll/unix/file.c | 8 ++++---- dlls/ntdll/unix/server.c | 2 +- dlls/ntdll/unix/socket.c | 6 +++--- dlls/ntdll/unix/unix_private.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 95ca5fa9b51..c40447933f0 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -4903,7 +4903,7 @@ struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE }
/* callback for irp async I/O completion */ -static BOOL irp_completion( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL irp_completion( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_irp *async = user;
@@ -4921,7 +4921,7 @@ static BOOL irp_completion( void *user, ULONG_PTR *info, NTSTATUS *status ) return TRUE; }
-static BOOL async_read_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL async_read_proc( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_fileio_read *fileio = user; int fd, needs_close, result; @@ -4971,7 +4971,7 @@ static BOOL async_read_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) return TRUE; }
-static BOOL async_write_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL async_write_proc( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_fileio_write *fileio = user; int result, fd, needs_close; @@ -6327,7 +6327,7 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE handle, IO_STATUS_BLOCK *io_status, LARGE_I }
-static BOOL read_changes_apc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL read_changes_apc( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_fileio_read_changes *fileio = user; int size = 0; diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index 3daaf95d8ee..a960e881395 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -371,7 +371,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO { struct async_fileio *user = wine_server_get_ptr( call->async_io.user ); ULONG_PTR info = call->async_io.result; - NTSTATUS status; + unsigned int status;
result->type = call->type; status = call->async_io.status; diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index 779cc46fe32..3cddc7da965 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -809,7 +809,7 @@ static NTSTATUS try_recv( int fd, struct async_recv_ioctl *async, ULONG_PTR *siz return status; }
-static BOOL async_recv_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL async_recv_proc( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_recv_ioctl *async = user; int fd, needs_close; @@ -1046,7 +1046,7 @@ static NTSTATUS try_send( int fd, struct async_send_ioctl *async ) return STATUS_SUCCESS; }
-static BOOL async_send_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL async_send_proc( void *user, ULONG_PTR *info, unsigned int *status ) { struct async_send_ioctl *async = user; int fd, needs_close; @@ -1293,7 +1293,7 @@ static NTSTATUS try_transmit( int sock_fd, int file_fd, struct async_transmit_io return STATUS_SUCCESS; }
-static BOOL async_transmit_proc( void *user, ULONG_PTR *info, NTSTATUS *status ) +static BOOL async_transmit_proc( void *user, ULONG_PTR *info, unsigned int *status ) { int sock_fd, file_fd = -1, sock_needs_close = FALSE, file_needs_close = FALSE; struct async_transmit_ioctl *async = user; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index afdb8397415..b8570e642ac 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -76,7 +76,7 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void) }
/* returns TRUE if the async is complete; FALSE if it should be restarted */ -typedef BOOL async_callback_t( void *user, ULONG_PTR *info, NTSTATUS *status ); +typedef BOOL async_callback_t( void *user, ULONG_PTR *info, unsigned int *status );
struct async_fileio {