- Use NULL instead of 0 for all non-handle pointers.
- Fix non-ANSI function declarations. - Make a function static.
This commit is contained in:
parent
03f6f6f7cc
commit
c516571481
|
@ -371,7 +371,7 @@ void inherit_console(struct thread *parent_thread, struct process *process, obj_
|
|||
|
||||
static struct console_input* console_input_get( obj_handle_t handle, unsigned access )
|
||||
{
|
||||
struct console_input* console = 0;
|
||||
struct console_input* console = NULL;
|
||||
|
||||
if (handle)
|
||||
console = (struct console_input *)get_handle_obj( current->process, handle,
|
||||
|
|
|
@ -1042,7 +1042,7 @@ struct async *create_async(struct thread *thread, int* timeout, struct list *que
|
|||
{
|
||||
struct timeval when;
|
||||
|
||||
gettimeofday( &when, 0 );
|
||||
gettimeofday( &when, NULL );
|
||||
add_timeout( &when, *timeout );
|
||||
async->timeout = add_timeout_user( &when, async_callback, async );
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ static void file_queue_async( struct fd *fd, void *apc, void *user, void *iosb,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!create_async( current, 0, queue, apc, user, iosb ))
|
||||
if (!create_async( current, NULL, queue, apc, user, iosb ))
|
||||
return;
|
||||
|
||||
/* Check if the new pending request can be served immediately */
|
||||
|
|
|
@ -365,7 +365,7 @@ static struct mail_writer *create_mail_writer( struct mailslot *mailslot, unsign
|
|||
!((sharing & FILE_SHARE_WRITE) && (writer->sharing & FILE_SHARE_WRITE)))
|
||||
{
|
||||
set_error( STATUS_SHARING_VIOLATION );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ static void parse_args( int argc, char *argv[] )
|
|||
}
|
||||
}
|
||||
|
||||
static void sigterm_handler()
|
||||
static void sigterm_handler( int signum )
|
||||
{
|
||||
exit(1); /* make sure atexit functions get called */
|
||||
}
|
||||
|
|
|
@ -364,7 +364,7 @@ static void check_flushed( void *arg )
|
|||
{
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday( &tv, 0 );
|
||||
gettimeofday( &tv, NULL );
|
||||
add_timeout( &tv, 100 );
|
||||
server->flush_poll = add_timeout_user( &tv, check_flushed, server );
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ static int pipe_server_flush( struct fd *fd, struct event **event )
|
|||
server->event = create_event( NULL, 0, 0, 0 );
|
||||
if( !server->event )
|
||||
return 0;
|
||||
gettimeofday( &tv, 0 );
|
||||
gettimeofday( &tv, NULL );
|
||||
add_timeout( &tv, 100 );
|
||||
server->flush_poll = add_timeout_user( &tv, check_flushed, server );
|
||||
*event = server->event;
|
||||
|
|
|
@ -1181,7 +1181,7 @@ DECL_HANDLER(get_dll_info)
|
|||
if (dll)
|
||||
{
|
||||
reply->size = dll->size;
|
||||
reply->entry_point = 0; /* FIXME */
|
||||
reply->entry_point = NULL; /* FIXME */
|
||||
if (dll->filename)
|
||||
{
|
||||
size_t len = min( dll->namelen, get_reply_max_size() );
|
||||
|
|
|
@ -531,7 +531,7 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue
|
|||
if (timeout != -1)
|
||||
{
|
||||
struct timeval when;
|
||||
gettimeofday( &when, 0 );
|
||||
gettimeofday( &when, NULL );
|
||||
add_timeout( &when, timeout );
|
||||
result->timeout = add_timeout_user( &when, result_timeout, result );
|
||||
}
|
||||
|
@ -960,7 +960,7 @@ static void restart_timer( struct msg_queue *queue, struct timer *timer )
|
|||
struct timeval now;
|
||||
|
||||
list_remove( &timer->entry );
|
||||
gettimeofday( &now, 0 );
|
||||
gettimeofday( &now, NULL );
|
||||
while (!time_before( &now, &timer->when )) add_timeout( &timer->when, timer->rate );
|
||||
link_timer( queue, timer );
|
||||
set_next_timer( queue );
|
||||
|
@ -993,7 +993,7 @@ static struct timer *set_timer( struct msg_queue *queue, unsigned int rate )
|
|||
if (timer)
|
||||
{
|
||||
timer->rate = max( rate, 1 );
|
||||
gettimeofday( &timer->when, 0 );
|
||||
gettimeofday( &timer->when, NULL );
|
||||
add_timeout( &timer->when, rate );
|
||||
link_timer( queue, timer );
|
||||
/* check if we replaced the next timer */
|
||||
|
|
|
@ -111,7 +111,7 @@ static inline rectangle_t *add_rect( struct region *reg )
|
|||
if (!new_rect)
|
||||
{
|
||||
set_error( STATUS_NO_MEMORY );
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
reg->rects = new_rect;
|
||||
reg->size *= 2;
|
||||
|
|
|
@ -452,7 +452,7 @@ static void make_clean( struct key *key )
|
|||
}
|
||||
|
||||
/* go through all the notifications and send them if necessary */
|
||||
void check_notify( struct key *key, unsigned int change, int not_subtree )
|
||||
static void check_notify( struct key *key, unsigned int change, int not_subtree )
|
||||
{
|
||||
struct list *ptr, *next;
|
||||
|
||||
|
@ -1644,10 +1644,10 @@ static void set_periodic_save_timer(void)
|
|||
{
|
||||
struct timeval next;
|
||||
|
||||
gettimeofday( &next, 0 );
|
||||
gettimeofday( &next, NULL );
|
||||
add_timeout( &next, save_period );
|
||||
if (save_timeout_user) remove_timeout_user( save_timeout_user );
|
||||
save_timeout_user = add_timeout_user( &next, periodic_save, 0 );
|
||||
save_timeout_user = add_timeout_user( &next, periodic_save, NULL );
|
||||
}
|
||||
|
||||
/* save the modified registry branches to disk */
|
||||
|
|
|
@ -813,7 +813,7 @@ void close_master_socket(void)
|
|||
|
||||
if (master_socket_timeout)
|
||||
{
|
||||
gettimeofday( &when, 0 );
|
||||
gettimeofday( &when, NULL );
|
||||
add_timeout( &when, master_socket_timeout * 1000 );
|
||||
master_socket->timeout = add_timeout_user( &when, close_socket_timeout, NULL );
|
||||
}
|
||||
|
|
|
@ -181,25 +181,25 @@ static void sigint_callback(void)
|
|||
}
|
||||
|
||||
/* SIGHUP handler */
|
||||
static void do_sighup()
|
||||
static void do_sighup( int signum )
|
||||
{
|
||||
do_signal( handler_sighup );
|
||||
}
|
||||
|
||||
/* SIGTERM handler */
|
||||
static void do_sigterm()
|
||||
static void do_sigterm( int signum )
|
||||
{
|
||||
do_signal( handler_sigterm );
|
||||
}
|
||||
|
||||
/* SIGINT handler */
|
||||
static void do_sigint()
|
||||
static void do_sigint( int signum )
|
||||
{
|
||||
do_signal( handler_sigint );
|
||||
}
|
||||
|
||||
/* SIGCHLD handler */
|
||||
static void do_sigchld()
|
||||
static void do_sigchld( int signum )
|
||||
{
|
||||
do_signal( handler_sigchld );
|
||||
}
|
||||
|
|
|
@ -125,8 +125,8 @@ static int snapshot_next_process( struct snapshot *snapshot, struct next_process
|
|||
reply->count = ptr->count;
|
||||
reply->pid = get_process_id( ptr->process );
|
||||
reply->ppid = ptr->process->parent ? get_process_id( ptr->process->parent ) : 0;
|
||||
reply->heap = 0; /* FIXME */
|
||||
reply->module = 0; /* FIXME */
|
||||
reply->heap = NULL; /* FIXME */
|
||||
reply->module = NULL; /* FIXME */
|
||||
reply->threads = ptr->threads;
|
||||
reply->priority = ptr->priority;
|
||||
reply->handles = ptr->handles;
|
||||
|
|
|
@ -529,7 +529,7 @@ static void sock_queue_async( struct fd *fd, void *apc, void *user, void *iosb,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!create_async( current, 0, queue, apc, user, iosb ))
|
||||
if (!create_async( current, NULL, queue, apc, user, iosb ))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ static struct sock *accept_socket( obj_handle_t handle )
|
|||
acceptsock->wparam = 0;
|
||||
if (sock->event) acceptsock->event = (struct event *)grab_object( sock->event );
|
||||
acceptsock->flags = sock->flags;
|
||||
acceptsock->deferred = 0;
|
||||
acceptsock->deferred = NULL;
|
||||
if (!(acceptsock->fd = create_anonymous_fd( &sock_fd_ops, acceptfd, &acceptsock->obj )))
|
||||
{
|
||||
release_object( acceptsock );
|
||||
|
|
|
@ -147,7 +147,7 @@ static int set_timer( struct timer *timer, const abs_time_t *expire, int period,
|
|||
if (!expire->sec && !expire->usec)
|
||||
{
|
||||
/* special case: use now + period as first expiration */
|
||||
gettimeofday( &timer->when, 0 );
|
||||
gettimeofday( &timer->when, NULL );
|
||||
add_timeout( &timer->when, period );
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue