mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
server: Remove no longer needed NULL checks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0b4c8bf93f
commit
99dfb29048
2 changed files with 7 additions and 11 deletions
|
@ -381,19 +381,12 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
|
|||
}
|
||||
}
|
||||
|
||||
/* check if there are any queued async operations */
|
||||
int async_queued( struct async_queue *queue )
|
||||
{
|
||||
return queue && list_head( &queue->queue );
|
||||
}
|
||||
|
||||
/* check if an async operation is waiting to be alerted */
|
||||
int async_waiting( struct async_queue *queue )
|
||||
{
|
||||
struct list *ptr;
|
||||
struct async *async;
|
||||
|
||||
if (!queue) return 0;
|
||||
if (!(ptr = list_head( &queue->queue ))) return 0;
|
||||
async = LIST_ENTRY( ptr, struct async, queue_entry );
|
||||
return async->status == STATUS_PENDING;
|
||||
|
@ -430,8 +423,6 @@ void async_wake_up( struct async_queue *queue, unsigned int status )
|
|||
{
|
||||
struct list *ptr, *next;
|
||||
|
||||
if (!queue) return;
|
||||
|
||||
LIST_FOR_EACH_SAFE( ptr, next, &queue->queue )
|
||||
{
|
||||
struct async *async = LIST_ENTRY( ptr, struct async, queue_entry );
|
||||
|
@ -516,7 +507,7 @@ int async_is_blocking( struct async *async )
|
|||
struct async *find_pending_async( struct async_queue *queue )
|
||||
{
|
||||
struct async *async;
|
||||
if (queue) LIST_FOR_EACH_ENTRY( async, &queue->queue, struct async, queue_entry )
|
||||
LIST_FOR_EACH_ENTRY( async, &queue->queue, struct async, queue_entry )
|
||||
if (async->status == STATUS_PENDING) return (struct async *)grab_object( async );
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,6 @@ extern obj_handle_t async_handoff( struct async *async, int success, data_size_t
|
|||
extern void queue_async( struct async_queue *queue, struct async *async );
|
||||
extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status );
|
||||
extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total );
|
||||
extern int async_queued( struct async_queue *queue );
|
||||
extern int async_waiting( struct async_queue *queue );
|
||||
extern void async_terminate( struct async *async, unsigned int status );
|
||||
extern void async_wake_up( struct async_queue *queue, unsigned int status );
|
||||
|
@ -202,6 +201,12 @@ static inline void init_async_queue( struct async_queue *queue )
|
|||
list_init( &queue->queue );
|
||||
}
|
||||
|
||||
static inline int async_queued( struct async_queue *queue )
|
||||
{
|
||||
return !list_empty( &queue->queue );
|
||||
}
|
||||
|
||||
|
||||
/* access rights that require Unix read permission */
|
||||
#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
|
||||
|
||||
|
|
Loading…
Reference in a new issue