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;
......
......@@ -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);
......
......@@ -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;
......
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