Commit af4378d4 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use unsigned int for the return value of server calls.

To avoid typecasts in debug traces.
parent 74a5851e
......@@ -1994,7 +1994,7 @@ void init_startup_info(void)
{
WCHAR *src, *dst, *env, *image;
void *module = NULL;
NTSTATUS status;
unsigned int status;
SIZE_T size, info_size, env_size, env_pos;
RTL_USER_PROCESS_PARAMETERS *params = NULL;
startup_info_t *info;
......
......@@ -1935,10 +1935,10 @@ static NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
}
static NTSTATUS server_get_unix_name( HANDLE handle, char **unix_name )
static unsigned int server_get_unix_name( HANDLE handle, char **unix_name )
{
data_size_t size = 1024;
NTSTATUS ret;
unsigned int ret;
char *name;
for (;;)
......@@ -2051,10 +2051,10 @@ static NTSTATUS server_get_file_info( HANDLE handle, IO_STATUS_BLOCK *io, void *
}
static NTSTATUS server_open_file_object( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
ULONG sharing, ULONG options )
static unsigned int server_open_file_object( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
ULONG sharing, ULONG options )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( open_file_object )
{
......@@ -2178,7 +2178,7 @@ static NTSTATUS get_mountmgr_fs_info( HANDLE handle, int fd, struct mountmgr_uni
char *unix_name;
IO_STATUS_BLOCK io = {0};
HANDLE mountmgr;
NTSTATUS status;
unsigned int status;
int letter;
if ((status = server_get_unix_name( handle, &unix_name ))) return status;
......@@ -2551,12 +2551,12 @@ static NTSTATUS init_cached_dir_data( struct dir_data **data_ret, int fd, const
*
* Retrieve the cached directory data, or initialize it if necessary.
*/
static NTSTATUS get_cached_dir_data( HANDLE handle, struct dir_data **data_ret, int fd,
const UNICODE_STRING *mask )
static unsigned int get_cached_dir_data( HANDLE handle, struct dir_data **data_ret, int fd,
const UNICODE_STRING *mask )
{
unsigned int i;
int entry = -1, free_entries[16];
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( get_directory_cache_entry )
{
......@@ -2611,7 +2611,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event, PIO_APC_ROUTI
int cwd, fd, needs_close;
enum server_fd_type type;
struct dir_data *data;
NTSTATUS status;
unsigned int status;
TRACE("(%p %p %p %p %p %p 0x%08x 0x%08x 0x%08x %s 0x%08x\n",
handle, event, apc_routine, apc_context, io, buffer,
......@@ -3932,7 +3932,7 @@ NTSTATUS open_unix_file( HANDLE *handle, const char *unix_name, ACCESS_MASK acce
ULONG options, void *ea_buffer, ULONG ea_length )
{
struct object_attributes *objattr;
NTSTATUS status;
unsigned int status;
data_size_t len;
if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status;
......@@ -3967,7 +3967,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
UNICODE_STRING nt_name;
char *unix_name;
BOOL created = FALSE;
NTSTATUS status;
unsigned int status;
TRACE( "handle=%p access=%08x name=%s objattr=%08x root=%p sec=%p io=%p alloc_size=%p "
"attr=%08x sharing=%08x disp=%d options=%08x ea=%p.0x%08x\n",
......@@ -4077,7 +4077,7 @@ NTSTATUS WINAPI NtCreateMailslotFile( HANDLE *handle, ULONG access, OBJECT_ATTRI
IO_STATUS_BLOCK *io, ULONG options, ULONG quota, ULONG msg_size,
LARGE_INTEGER *timeout )
{
NTSTATUS status;
unsigned int status;
data_size_t len;
struct object_attributes *objattr;
......@@ -4112,7 +4112,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
ULONG max_inst, ULONG inbound_quota, ULONG outbound_quota,
LARGE_INTEGER *timeout )
{
NTSTATUS status;
unsigned int status;
data_size_t len;
struct object_attributes *objattr;
......@@ -4184,7 +4184,7 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
FILE_NETWORK_OPEN_INFORMATION *info )
{
char *unix_name;
NTSTATUS status;
unsigned int status;
UNICODE_STRING redir;
OBJECT_ATTRIBUTES new_attr = *attr;
......@@ -4229,7 +4229,7 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC_INFORMATION *info )
{
char *unix_name;
NTSTATUS status;
unsigned int status;
UNICODE_STRING redir;
OBJECT_ATTRIBUTES new_attr = *attr;
......@@ -4334,7 +4334,7 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
int fd, needs_close = FALSE;
ULONG attr;
unsigned int options;
NTSTATUS status;
unsigned int status;
TRACE( "(%p,%p,%p,0x%08x,0x%08x)\n", handle, io, ptr, len, class);
......@@ -4552,7 +4552,7 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
void *ptr, ULONG len, FILE_INFORMATION_CLASS class )
{
int fd, needs_close;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
TRACE( "(%p,%p,%p,0x%08x,0x%08x)\n", handle, io, ptr, len, class );
......@@ -5017,12 +5017,12 @@ static BOOL async_write_proc( void *user, ULONG_PTR *info, unsigned int *status
}
/* do a read call through the server */
static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_context,
IO_STATUS_BLOCK *io, void *buffer, ULONG size,
LARGE_INTEGER *offset, ULONG *key )
static unsigned int server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_context,
IO_STATUS_BLOCK *io, void *buffer, ULONG size,
LARGE_INTEGER *offset, ULONG *key )
{
struct async_irp *async;
NTSTATUS status;
unsigned int status;
HANDLE wait_handle;
ULONG options;
......@@ -5055,12 +5055,12 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a
}
/* do a write call through the server */
static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_context,
IO_STATUS_BLOCK *io, const void *buffer, ULONG size,
LARGE_INTEGER *offset, ULONG *key )
static unsigned int server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_context,
IO_STATUS_BLOCK *io, const void *buffer, ULONG size,
LARGE_INTEGER *offset, ULONG *key )
{
struct async_irp *async;
NTSTATUS status;
unsigned int status;
HANDLE wait_handle;
ULONG options;
......@@ -5100,7 +5100,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
PVOID out_buffer, UINT out_size )
{
struct async_irp *async;
NTSTATUS status;
unsigned int status;
HANDLE wait_handle;
ULONG options;
......@@ -5146,10 +5146,10 @@ struct io_timeouts
};
/* retrieve the I/O timeouts to use for a given handle */
static NTSTATUS get_io_timeouts( HANDLE handle, enum server_fd_type type, ULONG count, BOOL is_read,
struct io_timeouts *timeouts )
static unsigned int get_io_timeouts( HANDLE handle, enum server_fd_type type, ULONG count, BOOL is_read,
struct io_timeouts *timeouts )
{
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
timeouts->interval = timeouts->total = -1;
......@@ -5269,13 +5269,13 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
}
/* register an async I/O for a file read; helper for NtReadFile */
static NTSTATUS register_async_file_read( HANDLE handle, HANDLE event,
PIO_APC_ROUTINE apc, void *apc_user,
client_ptr_t iosb, void *buffer,
ULONG already, ULONG length, BOOL avail_mode )
static unsigned int register_async_file_read( HANDLE handle, HANDLE event,
PIO_APC_ROUTINE apc, void *apc_user,
client_ptr_t iosb, void *buffer,
ULONG already, ULONG length, BOOL avail_mode )
{
struct async_fileio_read *fileio;
NTSTATUS status;
unsigned int status;
if (!(fileio = (struct async_fileio_read *)alloc_fileio( sizeof(*fileio), async_read_proc, handle )))
return STATUS_NO_MEMORY;
......@@ -5312,9 +5312,9 @@ void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info
SERVER_END_REQ;
}
static NTSTATUS set_pending_write( HANDLE device )
static unsigned int set_pending_write( HANDLE device )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( set_serial_info )
{
......@@ -5337,7 +5337,7 @@ NTSTATUS WINAPI NtReadFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo
int result, unix_handle, needs_close;
unsigned int options;
struct io_timeouts timeouts;
NTSTATUS status, ret_status;
unsigned int status, ret_status;
UINT total = 0;
client_ptr_t iosb_ptr = iosb_client_ptr(io);
enum server_fd_type type;
......@@ -5538,8 +5538,7 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
ULONG length, LARGE_INTEGER *offset, ULONG *key )
{
int result, unix_handle, needs_close;
unsigned int options;
NTSTATUS status;
unsigned int options, status;
UINT pos = 0, total = 0;
client_ptr_t iosb_ptr = iosb_client_ptr(io);
enum server_fd_type type;
......@@ -5618,7 +5617,7 @@ NTSTATUS WINAPI NtWriteFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, v
int result, unix_handle, needs_close;
unsigned int options;
struct io_timeouts timeouts;
NTSTATUS status, ret_status;
unsigned int status, ret_status;
UINT total = 0;
client_ptr_t iosb_ptr = iosb_client_ptr(io);
enum server_fd_type type;
......@@ -5846,8 +5845,7 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
ULONG length, LARGE_INTEGER *offset, ULONG *key )
{
int result, unix_handle, needs_close;
unsigned int options;
NTSTATUS status;
unsigned int options, status;
UINT pos = 0, total = 0;
client_ptr_t iosb_ptr = iosb_client_ptr(io);
enum server_fd_type type;
......@@ -6172,7 +6170,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE handle, IO_STATUS_BLOCK *io )
*/
NTSTATUS WINAPI NtCancelIoFile( HANDLE handle, IO_STATUS_BLOCK *io_status )
{
NTSTATUS status;
unsigned int status;
TRACE( "%p %p\n", handle, io_status );
......@@ -6197,7 +6195,7 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE handle, IO_STATUS_BLOCK *io_status )
*/
NTSTATUS WINAPI NtCancelIoFileEx( HANDLE handle, IO_STATUS_BLOCK *io, IO_STATUS_BLOCK *io_status )
{
NTSTATUS status;
unsigned int status;
TRACE( "%p %p %p\n", handle, io, io_status );
......@@ -6222,7 +6220,7 @@ NTSTATUS WINAPI NtCancelIoFileEx( HANDLE handle, IO_STATUS_BLOCK *io, IO_STATUS_
*/
NTSTATUS WINAPI NtCancelSynchronousIoFile( HANDLE handle, IO_STATUS_BLOCK *io, IO_STATUS_BLOCK *io_status )
{
NTSTATUS status;
unsigned int status;
TRACE( "(%p %p %p)\n", handle, io, io_status );
......@@ -6247,7 +6245,7 @@ NTSTATUS WINAPI NtLockFile( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc, void
LARGE_INTEGER *count, ULONG *key, BOOLEAN dont_wait, BOOLEAN exclusive )
{
static int warn;
NTSTATUS ret;
unsigned int ret;
HANDLE handle;
BOOLEAN async;
......@@ -6304,7 +6302,7 @@ NTSTATUS WINAPI NtLockFile( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc, void
NTSTATUS WINAPI NtUnlockFile( HANDLE handle, IO_STATUS_BLOCK *io_status, LARGE_INTEGER *offset,
LARGE_INTEGER *count, ULONG *key )
{
NTSTATUS status;
unsigned int status;
TRACE( "%p %x%08x %x%08x\n",
handle, offset->u.HighPart, offset->u.LowPart, count->u.HighPart, count->u.LowPart );
......@@ -6417,7 +6415,7 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
ULONG buffer_size, ULONG filter, BOOLEAN subtree )
{
struct async_fileio_read_changes *fileio;
NTSTATUS status;
unsigned int status;
ULONG size = max( 4096, buffer_size );
TRACE( "%p %p %p %p %p %p %u %u %d\n",
......@@ -6660,7 +6658,7 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
FS_INFORMATION_CLASS info_class )
{
int fd, needs_close;
NTSTATUS status;
unsigned int status;
status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL );
if (status == STATUS_BAD_DEVICE_TYPE)
......@@ -6965,7 +6963,7 @@ static void *put_object_type_info( OBJECT_TYPE_INFORMATION *p, struct object_typ
NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len, ULONG *used_len )
{
NTSTATUS status;
unsigned int status;
TRACE("(%p,0x%08x,%p,0x%08x,%p)\n", handle, info_class, ptr, len, used_len);
......@@ -7164,7 +7162,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
NTSTATUS WINAPI NtSetInformationObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len )
{
NTSTATUS status;
unsigned int status;
TRACE("(%p,0x%08x,%p,0x%08x)\n", handle, info_class, ptr, len);
......
......@@ -1813,7 +1813,7 @@ NTSTATUS load_main_exe( const WCHAR *dos_name, const char *unix_name, const WCHA
UNICODE_STRING nt_name;
WCHAR *tmp = NULL;
BOOL contains_path;
NTSTATUS status;
unsigned int status;
SIZE_T size;
struct stat st;
WORD machine;
......@@ -1872,7 +1872,7 @@ NTSTATUS load_start_exe( WCHAR **image, void **module )
{
static const WCHAR startW[] = {'s','t','a','r','t','.','e','x','e',0};
UNICODE_STRING nt_name;
NTSTATUS status;
unsigned int status;
SIZE_T size;
*image = malloc( sizeof("\\??\\C:\\windows\\system32\\start.exe") * sizeof(WCHAR) );
......@@ -1979,7 +1979,7 @@ static void load_ntdll(void)
static WCHAR path[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\',
's','y','s','t','e','m','3','2','\\','n','t','d','l','l','.','d','l','l',0};
const char *pe_dir = get_pe_dir( current_machine );
NTSTATUS status;
unsigned int status;
SECTION_IMAGE_INFORMATION info;
OBJECT_ATTRIBUTES attr;
UNICODE_STRING str;
......@@ -2021,7 +2021,7 @@ static void load_apiset_dll(void)
API_SET_NAMESPACE *map;
OBJECT_ATTRIBUTES attr;
UNICODE_STRING str;
NTSTATUS status;
unsigned int status;
HANDLE handle, mapping;
SIZE_T size;
char *name;
......@@ -2087,7 +2087,7 @@ static void load_wow64_ntdll( USHORT machine )
SECTION_IMAGE_INFORMATION info;
UNICODE_STRING nt_name;
void *module;
NTSTATUS status;
unsigned int status;
SIZE_T size;
WCHAR *path = malloc( sizeof("\\??\\C:\\windows\\system32\\ntdll.dll") * sizeof(WCHAR) );
......
......@@ -247,9 +247,9 @@ static BOOL get_so_file_info( int fd, pe_image_info_t *info )
/***********************************************************************
* get_pe_file_info
*/
static NTSTATUS get_pe_file_info( OBJECT_ATTRIBUTES *attr, HANDLE *handle, pe_image_info_t *info )
static unsigned int get_pe_file_info( OBJECT_ATTRIBUTES *attr, HANDLE *handle, pe_image_info_t *info )
{
NTSTATUS status;
unsigned int status;
HANDLE mapping;
char *unix_name;
......@@ -680,7 +680,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
RTL_USER_PROCESS_PARAMETERS *params, PS_CREATE_INFO *info,
PS_ATTRIBUTE_LIST *ps_attr )
{
NTSTATUS status;
unsigned int status;
BOOL success = FALSE;
HANDLE file_handle, process_info = 0, process_handle = 0, thread_handle = 0;
struct object_attributes *objattr;
......@@ -944,7 +944,7 @@ done:
*/
NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
{
NTSTATUS ret;
unsigned int ret;
BOOL self;
SERVER_START_REQ( terminate_process )
......@@ -1066,7 +1066,7 @@ void fill_vm_counters( VM_COUNTERS_EX *pvmi, int unix_pid )
NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class, void *info,
ULONG size, ULONG *ret_len )
{
NTSTATUS ret = STATUS_SUCCESS;
unsigned int ret = STATUS_SUCCESS;
ULONG len = 0;
TRACE( "(%p,0x%08x,%p,0x%08x,%p)\n", handle, class, info, size, ret_len );
......@@ -1531,7 +1531,7 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
*/
NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class, void *info, ULONG size )
{
NTSTATUS ret = STATUS_SUCCESS;
unsigned int ret = STATUS_SUCCESS;
switch (class)
{
......@@ -1658,7 +1658,7 @@ NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class,
NTSTATUS WINAPI NtOpenProcess( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id )
{
NTSTATUS status;
unsigned int status;
*handle = 0;
......@@ -1680,7 +1680,7 @@ NTSTATUS WINAPI NtOpenProcess( HANDLE *handle, ACCESS_MASK access,
*/
NTSTATUS WINAPI NtSuspendProcess( HANDLE handle )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( suspend_process )
{
......@@ -1697,7 +1697,7 @@ NTSTATUS WINAPI NtSuspendProcess( HANDLE handle )
*/
NTSTATUS WINAPI NtResumeProcess( HANDLE handle )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( resume_process )
{
......@@ -1714,7 +1714,7 @@ NTSTATUS WINAPI NtResumeProcess( HANDLE handle )
*/
NTSTATUS WINAPI NtDebugActiveProcess( HANDLE process, HANDLE debug )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( debug_process )
{
......@@ -1733,7 +1733,7 @@ NTSTATUS WINAPI NtDebugActiveProcess( HANDLE process, HANDLE debug )
*/
NTSTATUS WINAPI NtRemoveProcessDebug( HANDLE process, HANDLE debug )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( debug_process )
{
......@@ -1752,7 +1752,7 @@ NTSTATUS WINAPI NtRemoveProcessDebug( HANDLE process, HANDLE debug )
*/
NTSTATUS WINAPI NtDebugContinue( HANDLE handle, CLIENT_ID *client, NTSTATUS status )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( continue_debug_event )
{
......
......@@ -75,7 +75,7 @@ NTSTATUS open_hkcu_key( const char *path, HANDLE *key )
NTSTATUS WINAPI NtCreateKey( HANDLE *key, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
ULONG index, const UNICODE_STRING *class, ULONG options, ULONG *dispos )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -133,7 +133,7 @@ NTSTATUS WINAPI NtCreateKeyTransacted( HANDLE *key, ACCESS_MASK access, const OB
*/
NTSTATUS WINAPI NtOpenKeyEx( HANDLE *key, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, ULONG options )
{
NTSTATUS ret;
unsigned int ret;
ULONG attributes;
*key = 0;
......@@ -196,7 +196,7 @@ NTSTATUS WINAPI NtOpenKeyTransacted( HANDLE *key, ACCESS_MASK access, const OBJE
*/
NTSTATUS WINAPI NtDeleteKey( HANDLE key )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p)\n", key );
......@@ -215,7 +215,7 @@ NTSTATUS WINAPI NtDeleteKey( HANDLE key )
*/
NTSTATUS WINAPI NtRenameKey( HANDLE key, UNICODE_STRING *name )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p %s)\n", key, debugstr_us(name) );
......@@ -242,7 +242,7 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
void *info, DWORD length, DWORD *result_len )
{
NTSTATUS ret;
unsigned int ret;
void *data_ptr;
size_t fixed_size;
......@@ -437,7 +437,7 @@ static void copy_key_value_info( KEY_VALUE_INFORMATION_CLASS info_class, void *i
NTSTATUS WINAPI NtEnumerateValueKey( HANDLE handle, ULONG index, KEY_VALUE_INFORMATION_CLASS info_class,
void *info, DWORD length, DWORD *result_len )
{
NTSTATUS ret;
unsigned int ret;
void *ptr;
size_t fixed_size;
......@@ -481,7 +481,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
KEY_VALUE_INFORMATION_CLASS info_class,
void *info, DWORD length, DWORD *result_len )
{
NTSTATUS ret;
unsigned int ret;
UCHAR *data_ptr;
unsigned int fixed_size, min_size;
......@@ -560,7 +560,7 @@ NTSTATUS WINAPI NtQueryMultipleValueKey( HANDLE key, KEY_MULTIPLE_VALUE_INFORMAT
NTSTATUS WINAPI NtSetValueKey( HANDLE key, const UNICODE_STRING *name, ULONG index,
ULONG type, const void *data, ULONG count )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,%s,%d,%p,%d)\n", key, debugstr_us(name), type, data, count );
......@@ -585,7 +585,7 @@ NTSTATUS WINAPI NtSetValueKey( HANDLE key, const UNICODE_STRING *name, ULONG ind
*/
NTSTATUS WINAPI NtDeleteValueKey( HANDLE key, const UNICODE_STRING *name )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,%s)\n", key, debugstr_us(name) );
......@@ -610,7 +610,7 @@ NTSTATUS WINAPI NtNotifyChangeMultipleKeys( HANDLE key, ULONG count, OBJECT_ATTR
IO_STATUS_BLOCK *io, ULONG filter, BOOLEAN subtree,
void *buffer, ULONG length, BOOLEAN async )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,%u,%p,%p,%p,%p,%p,0x%08x, 0x%08x,%p,0x%08x,0x%08x)\n",
key, count, attr, event, apc, apc_context, io, filter, async, buffer, length, subtree );
......@@ -662,7 +662,7 @@ NTSTATUS WINAPI NtNotifyChangeKey( HANDLE key, HANDLE event, PIO_APC_ROUTINE apc
*/
NTSTATUS WINAPI NtFlushKey( HANDLE key )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "key=%p\n", key );
......@@ -699,7 +699,7 @@ NTSTATUS WINAPI NtLoadKey2( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fi
NTSTATUS WINAPI NtLoadKeyEx( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *file, ULONG flags, HANDLE trustkey,
HANDLE event, ACCESS_MASK access, HANDLE *roothandle, IO_STATUS_BLOCK *iostatus )
{
NTSTATUS ret;
unsigned int ret;
HANDLE key;
data_size_t len;
struct object_attributes *objattr;
......@@ -749,7 +749,7 @@ NTSTATUS WINAPI NtLoadKeyEx( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *f
*/
NTSTATUS WINAPI NtUnloadKey( OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p)\n", attr );
......@@ -774,7 +774,7 @@ NTSTATUS WINAPI NtUnloadKey( OBJECT_ATTRIBUTES *attr )
*/
NTSTATUS WINAPI NtSaveKey( HANDLE key, HANDLE file )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,%p)\n", key, file );
......
......@@ -51,7 +51,7 @@ NTSTATUS WINAPI NtOpenProcessToken( HANDLE process, DWORD access, HANDLE *handle
*/
NTSTATUS WINAPI NtOpenProcessTokenEx( HANDLE process, DWORD access, DWORD attributes, HANDLE *handle )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,0x%08x,0x%08x,%p)\n", process, access, attributes, handle );
......@@ -86,7 +86,7 @@ NTSTATUS WINAPI NtOpenThreadToken( HANDLE thread, DWORD access, BOOLEAN self, HA
NTSTATUS WINAPI NtOpenThreadTokenEx( HANDLE thread, DWORD access, BOOLEAN self, DWORD attributes,
HANDLE *handle )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,0x%08x,%u,0x%08x,%p)\n", thread, access, self, attributes, handle );
......@@ -113,7 +113,7 @@ NTSTATUS WINAPI NtOpenThreadTokenEx( HANDLE thread, DWORD access, BOOLEAN self,
NTSTATUS WINAPI NtDuplicateToken( HANDLE token, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
SECURITY_IMPERSONATION_LEVEL level, TOKEN_TYPE type, HANDLE *handle )
{
NTSTATUS status;
unsigned int status;
data_size_t len;
struct object_attributes *objattr;
......@@ -198,7 +198,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
};
ULONG len = 0;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
TRACE( "(%p,%d,%p,%d,%p)\n", token, class, info, length, retlen );
......@@ -492,7 +492,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
NTSTATUS WINAPI NtSetInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS class,
void *info, ULONG length )
{
NTSTATUS ret = STATUS_NOT_IMPLEMENTED;
unsigned int ret = STATUS_NOT_IMPLEMENTED;
TRACE( "%p %d %p %u\n", token, class, info, length );
......@@ -584,7 +584,7 @@ NTSTATUS WINAPI NtAdjustGroupsToken( HANDLE token, BOOLEAN reset, TOKEN_GROUPS *
NTSTATUS WINAPI NtAdjustPrivilegesToken( HANDLE token, BOOLEAN disable, TOKEN_PRIVILEGES *privs,
DWORD length, TOKEN_PRIVILEGES *prev, DWORD *retlen )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p,0x%08x,%p,0x%08x,%p,%p)\n", token, disable, privs, length, prev, retlen );
......@@ -620,7 +620,7 @@ NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_
data_size_t privileges_len = 0;
data_size_t sids_len = 0;
SID *sids = NULL;
NTSTATUS status;
unsigned int status;
TRACE( "%p %#x %p %p %p %p\n", token, flags, disable_sids, privileges,
restrict_sids, new_token );
......@@ -679,7 +679,7 @@ NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_
*/
NTSTATUS WINAPI NtPrivilegeCheck( HANDLE token, PRIVILEGE_SET *privs, BOOLEAN *res )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( check_token_privileges )
{
......@@ -715,7 +715,7 @@ NTSTATUS WINAPI NtAccessCheck( PSECURITY_DESCRIPTOR descr, HANDLE token, ACCESS_
struct object_attributes *objattr;
data_size_t len;
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
unsigned int status;
ULONG priv_len;
TRACE( "(%p, %p, %08x, %p, %p, %p, %p, %p)\n",
......@@ -783,7 +783,7 @@ NTSTATUS WINAPI NtQuerySecurityObject( HANDLE handle, SECURITY_INFORMATION info,
PSECURITY_DESCRIPTOR descr, ULONG length, ULONG *retlen )
{
SECURITY_DESCRIPTOR_RELATIVE *psd = descr;
NTSTATUS status;
unsigned int status;
void *buffer;
unsigned int buffer_size = 512;
......@@ -845,7 +845,7 @@ NTSTATUS WINAPI NtSetSecurityObject( HANDLE handle, SECURITY_INFORMATION info, P
struct security_descriptor *sd;
data_size_t len;
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
unsigned int status;
TRACE( "%p 0x%08x %p\n", handle, info, descr );
......@@ -886,7 +886,7 @@ NTSTATUS WINAPI NtSetSecurityObject( HANDLE handle, SECURITY_INFORMATION info, P
*/
NTSTATUS WINAPI NtAllocateLocallyUniqueId( LUID *luid )
{
NTSTATUS status;
unsigned int status;
TRACE( "%p\n", luid );
......
......@@ -406,7 +406,7 @@ static NTSTATUS get_status(int fd, SERIAL_STATUS* ss)
static void stop_waiting( HANDLE handle )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( set_serial_info )
{
......@@ -420,7 +420,7 @@ static void stop_waiting( HANDLE handle )
static NTSTATUS get_wait_mask(HANDLE hDevice, UINT *mask, UINT *cookie, BOOL *pending_write, BOOL start_wait)
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( get_serial_info )
{
......
......@@ -1074,7 +1074,7 @@ done:
*/
NTSTATUS CDECL wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, HANDLE *handle )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
wine_server_send_fd( fd );
......@@ -1575,7 +1575,7 @@ size_t server_init_process(void)
void server_init_process_done(void)
{
void *entry, *teb;
NTSTATUS status;
unsigned int status;
int suspend;
FILE_FS_DEVICE_INFORMATION info;
......@@ -1651,7 +1651,7 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source, HANDLE
ACCESS_MASK access, ULONG attributes, ULONG options )
{
sigset_t sigset;
NTSTATUS ret;
unsigned int ret;
int fd = -1;
if (dest) *dest = 0;
......@@ -1711,7 +1711,7 @@ NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source, HANDLE
*/
NTSTATUS WINAPI NtCompareObjects( HANDLE first, HANDLE second )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( compare_objects )
{
......@@ -1732,7 +1732,7 @@ NTSTATUS WINAPI NtClose( HANDLE handle )
{
sigset_t sigset;
HANDLE port;
NTSTATUS ret;
unsigned int ret;
int fd;
if (HandleToLong( handle ) >= ~5 && HandleToLong( handle ) <= ~0)
......
......@@ -2222,7 +2222,7 @@ static void ldt_set_fs( WORD sel, TEB *teb )
NTSTATUS get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len )
{
THREAD_DESCRIPTOR_INFORMATION *info = data;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
if (len != sizeof(*info)) return STATUS_INFO_LENGTH_MISMATCH;
if (info->Selector >> 16) return STATUS_UNSUCCESSFUL;
......
......@@ -630,7 +630,7 @@ static ssize_t fixup_icmp_over_dgram( struct msghdr *hdr, union unix_sockaddr *u
{
unsigned int tot_len = sizeof(struct ip_hdr) + recv_len;
struct icmp_hdr *icmp_h = NULL;
NTSTATUS fixup_status;
unsigned int fixup_status;
struct cmsghdr *cmsg;
struct ip_hdr ip_h;
size_t buf_len;
......@@ -854,8 +854,7 @@ static NTSTATUS sock_recv( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
{
HANDLE wait_handle;
BOOL nonblocking;
NTSTATUS status;
unsigned int i;
unsigned int i, status;
ULONG options;
for (i = 0; i < async->count; ++i)
......@@ -1101,7 +1100,7 @@ static NTSTATUS sock_send( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, voi
{
HANDLE wait_handle;
BOOL nonblocking;
NTSTATUS status;
unsigned int status;
ULONG options;
SERVER_START_REQ( send_socket )
......@@ -1334,7 +1333,7 @@ static NTSTATUS sock_transmit( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
union unix_sockaddr addr;
socklen_t addr_len;
HANDLE wait_handle;
NTSTATUS status;
unsigned int status;
ULONG options;
addr_len = sizeof(addr);
......
......@@ -151,8 +151,8 @@ static inline int use_futexes(void)
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len )
unsigned int alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len )
{
unsigned int len = sizeof(**ret);
SID *owner = NULL, *group = NULL;
......@@ -244,7 +244,7 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
}
static NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
static unsigned int validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
{
if (!attr || attr->Length != sizeof(*attr)) return STATUS_INVALID_PARAMETER;
......@@ -265,7 +265,7 @@ static NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
LONG initial, LONG max )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -294,7 +294,7 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
*/
NTSTATUS WINAPI NtOpenSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -320,7 +320,7 @@ NTSTATUS WINAPI NtOpenSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJEC
NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
unsigned int ret;
SEMAPHORE_BASIC_INFORMATION *out = info;
TRACE("(%p, %u, %p, %u, %p)\n", handle, class, info, len, ret_len);
......@@ -353,7 +353,7 @@ NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS cla
*/
NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( release_semaphore )
{
......@@ -375,7 +375,7 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, ULONG *previous
NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
EVENT_TYPE type, BOOLEAN state )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -404,7 +404,7 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
*/
NTSTATUS WINAPI NtOpenEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -429,7 +429,7 @@ NTSTATUS WINAPI NtOpenEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_AT
*/
NTSTATUS WINAPI NtSetEvent( HANDLE handle, LONG *prev_state )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( event_op )
{
......@@ -448,7 +448,7 @@ NTSTATUS WINAPI NtSetEvent( HANDLE handle, LONG *prev_state )
*/
NTSTATUS WINAPI NtResetEvent( HANDLE handle, LONG *prev_state )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( event_op )
{
......@@ -477,7 +477,7 @@ NTSTATUS WINAPI NtClearEvent( HANDLE handle )
*/
NTSTATUS WINAPI NtPulseEvent( HANDLE handle, LONG *prev_state )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( event_op )
{
......@@ -497,7 +497,7 @@ NTSTATUS WINAPI NtPulseEvent( HANDLE handle, LONG *prev_state )
NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
unsigned int ret;
EVENT_BASIC_INFORMATION *out = info;
TRACE("(%p, %u, %p, %u, %p)\n", handle, class, info, len, ret_len);
......@@ -532,7 +532,7 @@ NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
NTSTATUS WINAPI NtCreateMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
BOOLEAN owned )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -559,7 +559,7 @@ NTSTATUS WINAPI NtCreateMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT
*/
NTSTATUS WINAPI NtOpenMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -584,7 +584,7 @@ NTSTATUS WINAPI NtOpenMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_A
*/
NTSTATUS WINAPI NtReleaseMutant( HANDLE handle, LONG *prev_count )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( release_mutex )
{
......@@ -603,7 +603,7 @@ NTSTATUS WINAPI NtReleaseMutant( HANDLE handle, LONG *prev_count )
NTSTATUS WINAPI NtQueryMutant( HANDLE handle, MUTANT_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
unsigned int ret;
MUTANT_BASIC_INFORMATION *out = info;
TRACE("(%p, %u, %p, %u, %p)\n", handle, class, info, len, ret_len);
......@@ -637,7 +637,7 @@ NTSTATUS WINAPI NtQueryMutant( HANDLE handle, MUTANT_INFORMATION_CLASS class,
*/
NTSTATUS WINAPI NtCreateJobObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -662,7 +662,7 @@ NTSTATUS WINAPI NtCreateJobObject( HANDLE *handle, ACCESS_MASK access, const OBJ
*/
NTSTATUS WINAPI NtOpenJobObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -687,7 +687,7 @@ NTSTATUS WINAPI NtOpenJobObject( HANDLE *handle, ACCESS_MASK access, const OBJEC
*/
NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p, %d)\n", handle, status );
......@@ -709,7 +709,7 @@ NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS class, void *info,
ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "semi-stub: %p %u %p %u %p\n", handle, class, info, len, ret_len );
......@@ -803,7 +803,7 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
*/
NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS class, void *info, ULONG len )
{
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
unsigned int status = STATUS_NOT_IMPLEMENTED;
JOBOBJECT_BASIC_LIMIT_INFORMATION *basic_limit;
ULONG info_size = sizeof(JOBOBJECT_BASIC_LIMIT_INFORMATION);
DWORD limit_flags = JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS;
......@@ -858,7 +858,7 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
*/
NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
{
NTSTATUS status;
unsigned int status;
TRACE( "(%p %p)\n", job, process );
......@@ -878,7 +878,7 @@ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
*/
NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
{
NTSTATUS status;
unsigned int status;
TRACE( "(%p %p)\n", job, process );
......@@ -899,7 +899,7 @@ NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
NTSTATUS WINAPI NtCreateDebugObject( HANDLE *handle, ACCESS_MASK access,
OBJECT_ATTRIBUTES *attr, ULONG flags )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -927,7 +927,7 @@ NTSTATUS WINAPI NtCreateDebugObject( HANDLE *handle, ACCESS_MASK access,
NTSTATUS WINAPI NtSetInformationDebugObject( HANDLE handle, DEBUGOBJECTINFOCLASS class,
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
unsigned int ret;
ULONG flags;
if (class != DebugObjectKillProcessOnExitInformation) return STATUS_INVALID_PARAMETER;
......@@ -1025,7 +1025,7 @@ NTSTATUS WINAPI NtWaitForDebugEvent( HANDLE handle, BOOLEAN alertable, LARGE_INT
DBGUI_WAIT_STATE_CHANGE *state )
{
debug_event_t data;
NTSTATUS ret;
unsigned int ret;
BOOL wait = TRUE;
for (;;)
......@@ -1058,7 +1058,7 @@ NTSTATUS WINAPI NtWaitForDebugEvent( HANDLE handle, BOOLEAN alertable, LARGE_INT
*/
NTSTATUS WINAPI NtCreateDirectoryObject( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -1083,7 +1083,7 @@ NTSTATUS WINAPI NtCreateDirectoryObject( HANDLE *handle, ACCESS_MASK access, OBJ
*/
NTSTATUS WINAPI NtOpenDirectoryObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -1111,7 +1111,7 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI
ULONG *context, ULONG *ret_size )
{
ULONG index = restart ? 0 : *context;
NTSTATUS ret;
unsigned int ret;
if (single_entry)
{
......@@ -1166,7 +1166,7 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI
NTSTATUS WINAPI NtCreateSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
OBJECT_ATTRIBUTES *attr, UNICODE_STRING *target )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -1195,7 +1195,7 @@ NTSTATUS WINAPI NtCreateSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
NTSTATUS WINAPI NtOpenSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -1220,7 +1220,7 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
*/
NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, UNICODE_STRING *target, ULONG *length )
{
NTSTATUS ret;
unsigned int ret;
if (!target) return STATUS_ACCESS_VIOLATION;
......@@ -1247,7 +1247,7 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, UNICODE_STRING *target
*/
NTSTATUS WINAPI NtMakeTemporaryObject( HANDLE handle )
{
NTSTATUS ret;
unsigned int ret;
TRACE("%p\n", handle);
......@@ -1267,7 +1267,7 @@ NTSTATUS WINAPI NtMakeTemporaryObject( HANDLE handle )
NTSTATUS WINAPI NtCreateTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
TIMER_TYPE type )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -1296,7 +1296,7 @@ NTSTATUS WINAPI NtCreateTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_
*/
NTSTATUS WINAPI NtOpenTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -1322,7 +1322,7 @@ NTSTATUS WINAPI NtOpenTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_AT
NTSTATUS WINAPI NtSetTimer( HANDLE handle, const LARGE_INTEGER *when, PTIMER_APC_ROUTINE callback,
void *arg, BOOLEAN resume, ULONG period, BOOLEAN *state )
{
NTSTATUS ret = STATUS_SUCCESS;
unsigned int ret = STATUS_SUCCESS;
TRACE( "(%p,%p,%p,%p,%08x,0x%08x,%p)\n", handle, when, callback, arg, resume, period, state );
......@@ -1349,7 +1349,7 @@ NTSTATUS WINAPI NtSetTimer( HANDLE handle, const LARGE_INTEGER *when, PTIMER_APC
*/
NTSTATUS WINAPI NtCancelTimer( HANDLE handle, BOOLEAN *state )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( cancel_timer )
{
......@@ -1369,7 +1369,7 @@ NTSTATUS WINAPI NtQueryTimer( HANDLE handle, TIMER_INFORMATION_CLASS class,
void *info, ULONG len, ULONG *ret_len )
{
TIMER_BASIC_INFORMATION *basic_info = info;
NTSTATUS ret;
unsigned int ret;
LARGE_INTEGER now;
TRACE( "(%p,%d,%p,0x%08x,%p)\n", handle, class, info, len, ret_len );
......@@ -1667,7 +1667,7 @@ NTSTATUS system_time_precise( void *args )
NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, ULONG flags )
{
NTSTATUS ret;
unsigned int ret;
data_size_t len;
struct object_attributes *objattr;
......@@ -1693,7 +1693,7 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
*/
NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -1756,7 +1756,7 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
NTSTATUS WINAPI NtCreateIoCompletion( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
ULONG threads )
{
NTSTATUS status;
unsigned int status;
data_size_t len;
struct object_attributes *objattr;
......@@ -1784,7 +1784,7 @@ NTSTATUS WINAPI NtCreateIoCompletion( HANDLE *handle, ACCESS_MASK access, OBJECT
*/
NTSTATUS WINAPI NtOpenIoCompletion( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS status;
unsigned int status;
*handle = 0;
if ((status = validate_open_object_attributes( attr ))) return status;
......@@ -1810,7 +1810,7 @@ NTSTATUS WINAPI NtOpenIoCompletion( HANDLE *handle, ACCESS_MASK access, const OB
NTSTATUS WINAPI NtSetIoCompletion( HANDLE handle, ULONG_PTR key, ULONG_PTR value,
NTSTATUS status, SIZE_T count )
{
NTSTATUS ret;
unsigned int ret;
TRACE( "(%p, %lx, %lx, %x, %lx)\n", handle, key, value, status, count );
......@@ -1834,7 +1834,7 @@ NTSTATUS WINAPI NtSetIoCompletion( HANDLE handle, ULONG_PTR key, ULONG_PTR value
NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE handle, ULONG_PTR *key, ULONG_PTR *value,
IO_STATUS_BLOCK *io, LARGE_INTEGER *timeout )
{
NTSTATUS status;
unsigned int status;
TRACE( "(%p, %p, %p, %p, %p)\n", handle, key, value, io, timeout );
......@@ -1865,7 +1865,7 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE handle, ULONG_PTR *key, ULONG_PTR *
NTSTATUS WINAPI NtRemoveIoCompletionEx( HANDLE handle, FILE_IO_COMPLETION_INFORMATION *info, ULONG count,
ULONG *written, LARGE_INTEGER *timeout, BOOLEAN alertable )
{
NTSTATUS status;
unsigned int status;
ULONG i = 0;
TRACE( "%p %p %u %p %p %u\n", handle, info, count, written, timeout, alertable );
......@@ -1908,7 +1908,7 @@ NTSTATUS WINAPI NtRemoveIoCompletionEx( HANDLE handle, FILE_IO_COMPLETION_INFORM
NTSTATUS WINAPI NtQueryIoCompletion( HANDLE handle, IO_COMPLETION_INFORMATION_CLASS class,
void *buffer, ULONG len, ULONG *ret_len )
{
NTSTATUS status;
unsigned int status;
TRACE( "(%p, %d, %p, 0x%x, %p)\n", handle, class, buffer, len, ret_len );
......@@ -1946,7 +1946,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
const LARGE_INTEGER *size, ULONG protect,
ULONG sec_flags, HANDLE file )
{
NTSTATUS ret;
unsigned int ret;
unsigned int file_access;
data_size_t len;
struct object_attributes *objattr;
......@@ -1999,7 +1999,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
*/
NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
if ((ret = validate_open_object_attributes( attr ))) return ret;
......@@ -2126,7 +2126,7 @@ NTSTATUS WINAPI NtReplyWaitReceivePort( HANDLE handle, ULONG *id, LPC_MESSAGE *r
#define MAX_ATOM_LEN 255
#define IS_INTATOM(x) (((ULONG_PTR)(x) >> 16) == 0)
static NTSTATUS is_integral_atom( const WCHAR *atomstr, ULONG len, RTL_ATOM *ret_atom )
static unsigned int is_integral_atom( const WCHAR *atomstr, ULONG len, RTL_ATOM *ret_atom )
{
RTL_ATOM atom;
......@@ -2175,7 +2175,7 @@ static ULONG integral_atom_name( WCHAR *buffer, ULONG len, RTL_ATOM atom )
*/
NTSTATUS WINAPI NtAddAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
{
NTSTATUS status = is_integral_atom( name, length / sizeof(WCHAR), atom );
unsigned int status = is_integral_atom( name, length / sizeof(WCHAR), atom );
if (status == STATUS_MORE_ENTRIES)
{
......@@ -2197,7 +2197,7 @@ NTSTATUS WINAPI NtAddAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
*/
NTSTATUS WINAPI NtDeleteAtom( RTL_ATOM atom )
{
NTSTATUS status;
unsigned int status;
SERVER_START_REQ( delete_atom )
{
......@@ -2214,7 +2214,7 @@ NTSTATUS WINAPI NtDeleteAtom( RTL_ATOM atom )
*/
NTSTATUS WINAPI NtFindAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
{
NTSTATUS status = is_integral_atom( name, length / sizeof(WCHAR), atom );
unsigned int status = is_integral_atom( name, length / sizeof(WCHAR), atom );
if (status == STATUS_MORE_ENTRIES)
{
......@@ -2237,7 +2237,7 @@ NTSTATUS WINAPI NtFindAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
NTSTATUS WINAPI NtQueryInformationAtom( RTL_ATOM atom, ATOM_INFORMATION_CLASS class,
void *ptr, ULONG size, ULONG *retsize )
{
NTSTATUS status;
unsigned int status;
switch (class)
{
......@@ -2540,7 +2540,7 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
*/
void set_async_direct_result( HANDLE *async_handle, NTSTATUS status, ULONG_PTR information, BOOL mark_pending )
{
NTSTATUS ret;
unsigned int ret;
/* if we got STATUS_ALERTED, we must have a valid async handle */
assert( *async_handle );
......
......@@ -2385,13 +2385,13 @@ static void read_dev_urandom( void *buf, ULONG len )
else WARN( "can't open /dev/urandom\n" );
}
static NTSTATUS get_system_process_info( SYSTEM_INFORMATION_CLASS class, void *info, ULONG size, ULONG *len )
static unsigned int get_system_process_info( SYSTEM_INFORMATION_CLASS class, void *info, ULONG size, ULONG *len )
{
unsigned int process_count, total_thread_count, total_name_len, i, j;
unsigned int thread_info_size;
unsigned int pos = 0;
char *buffer = NULL;
NTSTATUS ret;
unsigned int ret;
C_ASSERT( sizeof(struct thread_info) <= sizeof(SYSTEM_THREAD_INFORMATION) );
C_ASSERT( sizeof(struct process_info) <= sizeof(SYSTEM_PROCESS_INFORMATION) );
......@@ -2514,7 +2514,7 @@ C_ASSERT( sizeof(struct process_info) <= sizeof(SYSTEM_PROCESS_INFORMATION) );
NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
void *info, ULONG size, ULONG *ret_size )
{
NTSTATUS ret = STATUS_SUCCESS;
unsigned int ret = STATUS_SUCCESS;
ULONG len = 0;
TRACE( "(0x%08x,%p,0x%08x,%p)\n", class, info, size, ret_size );
......@@ -3207,7 +3207,7 @@ NTSTATUS WINAPI NtQuerySystemInformationEx( SYSTEM_INFORMATION_CLASS class,
void *info, ULONG size, ULONG *ret_size )
{
ULONG len = 0;
NTSTATUS ret = STATUS_NOT_IMPLEMENTED;
unsigned int ret = STATUS_NOT_IMPLEMENTED;
TRACE( "(0x%08x,%p,%u,%p,%u,%p) stub\n", class, query, query_len, info, size, ret_size );
......
......@@ -1256,7 +1256,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
DWORD tid = 0;
int request_pipe[2];
TEB *teb;
NTSTATUS status;
unsigned int status;
if (flags & ~supported_flags)
FIXME( "Unsupported flags %#x.\n", flags );
......@@ -1452,7 +1452,7 @@ void wait_suspend( CONTEXT *context )
*/
NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
{
NTSTATUS ret;
unsigned int ret;
DWORD i;
obj_handle_t handle = 0;
client_ptr_t params[EXCEPTION_MAXIMUM_PARAMETERS];
......@@ -1496,7 +1496,7 @@ NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_c
ret = wine_server_call( req );
}
SERVER_END_REQ;
if (ret >= 0) contexts_from_server( context, server_contexts );
if (NT_SUCCESS(ret)) contexts_from_server( context, server_contexts );
}
pthread_sigmask( SIG_SETMASK, &old_set, NULL );
......@@ -1544,7 +1544,7 @@ TEB * WINAPI NtCurrentTeb(void)
NTSTATUS WINAPI NtOpenThread( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id )
{
NTSTATUS ret;
unsigned int ret;
*handle = 0;
......@@ -1566,7 +1566,7 @@ NTSTATUS WINAPI NtOpenThread( HANDLE *handle, ACCESS_MASK access,
*/
NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *count )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( suspend_thread )
{
......@@ -1586,7 +1586,7 @@ NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *count )
*/
NTSTATUS WINAPI NtResumeThread( HANDLE handle, ULONG *count )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( resume_thread )
{
......@@ -1626,7 +1626,7 @@ NTSTATUS WINAPI NtAlertThread( HANDLE handle )
*/
NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
{
NTSTATUS ret;
unsigned int ret;
BOOL self;
SERVER_START_REQ( terminate_thread )
......@@ -1653,7 +1653,7 @@ NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code )
NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1,
ULONG_PTR arg2, ULONG_PTR arg3 )
{
NTSTATUS ret;
unsigned int ret;
SERVER_START_REQ( queue_apc )
{
......@@ -1681,7 +1681,7 @@ NTSTATUS set_thread_context( HANDLE handle, const void *context, BOOL *self, USH
{
context_t server_contexts[2];
unsigned int count = 0;
NTSTATUS ret;
unsigned int ret;
context_to_server( &server_contexts[count++], native_machine, context, machine );
if (machine != native_machine)
......@@ -1705,7 +1705,7 @@ NTSTATUS set_thread_context( HANDLE handle, const void *context, BOOL *self, USH
*/
NTSTATUS get_thread_context( HANDLE handle, void *context, BOOL *self, USHORT machine )
{
NTSTATUS ret;
unsigned int ret;
HANDLE context_handle;
context_t server_contexts[2];
unsigned int count;
......@@ -1847,7 +1847,7 @@ BOOL get_thread_times(int unix_pid, int unix_tid, LARGE_INTEGER *kernel_time, LA
static void set_native_thread_name( HANDLE handle, const UNICODE_STRING *name )
{
#ifdef linux
NTSTATUS status;
unsigned int status;
char path[64], nameA[64];
int unix_pid, unix_tid, len, fd;
......@@ -1944,7 +1944,7 @@ static BOOL is_process_wow64( const CLIENT_ID *id )
NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
void *data, ULONG length, ULONG *ret_len )
{
NTSTATUS status;
unsigned int status;
TRACE("(%p,%d,%p,%x,%p)\n", handle, class, data, length, ret_len);
......@@ -2201,7 +2201,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
const void *data, ULONG length )
{
NTSTATUS status;
unsigned int status;
TRACE("(%p,%d,%p,%x)\n", handle, class, data, length);
......@@ -2440,7 +2440,7 @@ NTSTATUS WINAPI NtGetNextThread( HANDLE process, HANDLE thread, ACCESS_MASK acce
ULONG flags, HANDLE *handle )
{
HANDLE ret_handle = 0;
NTSTATUS ret;
unsigned int ret;
TRACE( "process %p, thread %p, access %#x, attributes %#x, flags %#x, handle %p.\n",
process, thread, access, attributes, flags, handle );
......
......@@ -190,8 +190,8 @@ extern void wait_suspend( CONTEXT *context ) DECLSPEC_HIDDEN;
extern NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) DECLSPEC_HIDDEN;
extern NTSTATUS set_thread_context( HANDLE handle, const void *context, BOOL *self, USHORT machine ) DECLSPEC_HIDDEN;
extern NTSTATUS get_thread_context( HANDLE handle, void *context, BOOL *self, USHORT machine ) DECLSPEC_HIDDEN;
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len ) DECLSPEC_HIDDEN;
extern unsigned int alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
data_size_t *ret_len ) DECLSPEC_HIDDEN;
extern NTSTATUS system_time_precise( void *args ) DECLSPEC_HIDDEN;
extern void *anon_mmap_fixed( void *start, size_t size, int prot, int flags ) DECLSPEC_HIDDEN;
......
......@@ -2380,12 +2380,12 @@ static NTSTATUS map_image_into_view( struct file_view *view, const WCHAR *filena
/***********************************************************************
* get_mapping_info
*/
static NTSTATUS get_mapping_info( HANDLE handle, ACCESS_MASK access, unsigned int *sec_flags,
mem_size_t *full_size, HANDLE *shared_file, pe_image_info_t **info )
static unsigned int get_mapping_info( HANDLE handle, ACCESS_MASK access, unsigned int *sec_flags,
mem_size_t *full_size, HANDLE *shared_file, pe_image_info_t **info )
{
pe_image_info_t *image_info;
SIZE_T total, size = 1024;
NTSTATUS status;
unsigned int status;
for (;;)
{
......@@ -2439,7 +2439,7 @@ static NTSTATUS virtual_map_image( HANDLE mapping, ACCESS_MASK access, void **ad
int shared_fd = -1, shared_needs_close = 0;
SIZE_T size = image_info->map_size;
struct file_view *view;
NTSTATUS status;
unsigned int status;
sigset_t sigset;
void *base;
......@@ -2479,7 +2479,7 @@ static NTSTATUS virtual_map_image( HANDLE mapping, ACCESS_MASK access, void **ad
}
SERVER_END_REQ;
}
if (status >= 0)
if (NT_SUCCESS(status))
{
if (is_builtin) add_builtin_module( view->base, NULL );
*addr_ptr = view->base;
......@@ -2501,11 +2501,11 @@ done:
*
* Map a file section into memory.
*/
static NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_PTR zero_bits,
SIZE_T commit_size, const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr,
ULONG alloc_type, ULONG protect )
static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_PTR zero_bits,
SIZE_T commit_size, const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr,
ULONG alloc_type, ULONG protect )
{
NTSTATUS res;
unsigned int res;
mem_size_t full_size;
ACCESS_MASK access;
SIZE_T size;
......@@ -2605,7 +2605,7 @@ static NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_PTR z
}
else ERR( "mapping %p %lx %x%08x failed\n", view->base, size, offset.u.HighPart, offset.u.LowPart );
if (res >= 0)
if (NT_SUCCESS(res))
{
*addr_ptr = view->base;
*size_ptr = size;
......@@ -3860,7 +3860,7 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
{
apc_call_t call;
apc_result_t result;
NTSTATUS status;
unsigned int status;
memset( &call, 0, sizeof(call) );
......@@ -3959,7 +3959,7 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
{
apc_call_t call;
apc_result_t result;
NTSTATUS status;
unsigned int status;
memset( &call, 0, sizeof(call) );
......@@ -3994,7 +3994,7 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
struct file_view *view;
char *base;
sigset_t sigset;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
LPVOID addr = *addr_ptr;
SIZE_T size = *size_ptr;
......@@ -4083,7 +4083,7 @@ NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T
{
struct file_view *view;
sigset_t sigset;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
char *base;
BYTE vprot;
SIZE_T size = *size_ptr;
......@@ -4195,7 +4195,7 @@ static int get_free_mem_state_callback( void *start, SIZE_T size, void *arg )
return 1;
}
static NTSTATUS fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFORMATION *info )
static unsigned int fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFORMATION *info )
{
char *base, *alloc_base = 0, *alloc_end = working_set_limit;
struct wine_rb_entry *ptr;
......@@ -4279,18 +4279,17 @@ static NTSTATUS fill_basic_memory_info( const void *addr, MEMORY_BASIC_INFORMATI
}
/* get basic information about a memory block */
static NTSTATUS get_basic_memory_info( HANDLE process, LPCVOID addr,
MEMORY_BASIC_INFORMATION *info,
SIZE_T len, SIZE_T *res_len )
static unsigned int get_basic_memory_info( HANDLE process, LPCVOID addr,
MEMORY_BASIC_INFORMATION *info,
SIZE_T len, SIZE_T *res_len )
{
NTSTATUS status;
unsigned int status;
if (len < sizeof(*info))
return STATUS_INFO_LENGTH_MISMATCH;
if (process != NtCurrentProcess())
{
NTSTATUS status;
apc_call_t call;
apc_result_t result;
......@@ -4323,11 +4322,11 @@ static NTSTATUS get_basic_memory_info( HANDLE process, LPCVOID addr,
return STATUS_SUCCESS;
}
static NTSTATUS get_memory_region_info( HANDLE process, LPCVOID addr, MEMORY_REGION_INFORMATION *info,
SIZE_T len, SIZE_T *res_len )
static unsigned int get_memory_region_info( HANDLE process, LPCVOID addr, MEMORY_REGION_INFORMATION *info,
SIZE_T len, SIZE_T *res_len )
{
MEMORY_BASIC_INFORMATION basic_info;
NTSTATUS status;
unsigned int status;
if (len < FIELD_OFFSET(MEMORY_REGION_INFORMATION, CommitSize))
return STATUS_INFO_LENGTH_MISMATCH;
......@@ -4468,10 +4467,10 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr,
return STATUS_SUCCESS;
}
static NTSTATUS get_memory_section_name( HANDLE process, LPCVOID addr,
MEMORY_SECTION_NAME *info, SIZE_T len, SIZE_T *ret_len )
static unsigned int get_memory_section_name( HANDLE process, LPCVOID addr,
MEMORY_SECTION_NAME *info, SIZE_T len, SIZE_T *ret_len )
{
NTSTATUS status;
unsigned int status;
if (!info) return STATUS_ACCESS_VIOLATION;
......@@ -4555,7 +4554,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
*/
NTSTATUS WINAPI NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, ULONG unknown )
{
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
if (process != NtCurrentProcess())
{
......@@ -4592,7 +4591,7 @@ NTSTATUS WINAPI NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size,
*/
NTSTATUS WINAPI NtUnlockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, ULONG unknown )
{
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
if (process != NtCurrentProcess())
{
......@@ -4631,7 +4630,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
SIZE_T commit_size, const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr,
SECTION_INHERIT inherit, ULONG alloc_type, ULONG protect )
{
NTSTATUS res;
unsigned int res;
SIZE_T mask = granularity_mask;
LARGE_INTEGER offset;
......@@ -4685,7 +4684,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
res = server_queue_process_apc( process, &call, &result );
if (res != STATUS_SUCCESS) return res;
if ((NTSTATUS)result.map_view.status >= 0)
if (NT_SUCCESS(result.map_view.status))
{
*addr_ptr = wine_server_get_ptr( result.map_view.addr );
*size_ptr = result.map_view.size;
......@@ -4717,7 +4716,7 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
{
struct file_view *view;
NTSTATUS status = STATUS_NOT_MAPPED_VIEW;
unsigned int status = STATUS_NOT_MAPPED_VIEW;
sigset_t sigset;
if (process != NtCurrentProcess())
......@@ -4822,7 +4821,7 @@ void virtual_fill_image_information( const pe_image_info_t *pe_info, SECTION_IMA
NTSTATUS WINAPI NtQuerySection( HANDLE handle, SECTION_INFORMATION_CLASS class, void *ptr,
SIZE_T size, SIZE_T *ret_size )
{
NTSTATUS status;
unsigned int status;
pe_image_info_t image_info;
switch (class)
......@@ -4877,7 +4876,7 @@ NTSTATUS WINAPI NtFlushVirtualMemory( HANDLE process, LPCVOID *addr_ptr,
SIZE_T *size_ptr, ULONG unknown )
{
struct file_view *view;
NTSTATUS status = STATUS_SUCCESS;
unsigned int status = STATUS_SUCCESS;
sigset_t sigset;
void *addr = ROUND_ADDR( *addr_ptr, page_mask );
......@@ -4998,7 +4997,7 @@ NTSTATUS WINAPI NtResetWriteWatch( HANDLE process, PVOID base, SIZE_T size )
NTSTATUS WINAPI NtReadVirtualMemory( HANDLE process, const void *addr, void *buffer,
SIZE_T size, SIZE_T *bytes_read )
{
NTSTATUS status;
unsigned int status;
if (virtual_check_buffer_for_write( buffer, size ))
{
......@@ -5028,7 +5027,7 @@ NTSTATUS WINAPI NtReadVirtualMemory( HANDLE process, const void *addr, void *buf
NTSTATUS WINAPI NtWriteVirtualMemory( HANDLE process, void *addr, const void *buffer,
SIZE_T size, SIZE_T *bytes_written )
{
NTSTATUS status;
unsigned int status;
if (virtual_check_buffer_for_read( buffer, size ))
{
......@@ -5058,7 +5057,7 @@ NTSTATUS WINAPI NtWriteVirtualMemory( HANDLE process, void *addr, const void *bu
NTSTATUS WINAPI NtAreMappedFilesTheSame(PVOID addr1, PVOID addr2)
{
struct file_view *view1, *view2;
NTSTATUS status;
unsigned int status;
sigset_t sigset;
TRACE("%p %p\n", addr1, addr2);
......@@ -5207,7 +5206,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
{
void *base;
SIZE_T size;
NTSTATUS status;
unsigned int status;
TRACE("%p %s %s %x %08x\n", process,
wine_dbgstr_longlong(*ret), wine_dbgstr_longlong(*size_ptr), type, protect );
......@@ -5261,7 +5260,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
NTSTATUS WINAPI NtWow64ReadVirtualMemory64( HANDLE process, ULONG64 addr, void *buffer,
ULONG64 size, ULONG64 *bytes_read )
{
NTSTATUS status;
unsigned int status;
if (size > MAXLONG) size = MAXLONG;
......@@ -5293,7 +5292,7 @@ NTSTATUS WINAPI NtWow64ReadVirtualMemory64( HANDLE process, ULONG64 addr, void *
NTSTATUS WINAPI NtWow64WriteVirtualMemory64( HANDLE process, ULONG64 addr, const void *buffer,
ULONG64 size, ULONG64 *bytes_written )
{
NTSTATUS status;
unsigned int status;
if (size > MAXLONG) size = MAXLONG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment