Commit 99dfb290 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Remove no longer needed NULL checks.

parent 0b4c8bf9
......@@ -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)
......
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