mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 02:28:19 +02:00
event-loop: clean up some warnings
This commit is contained in:
parent
9f197b58e2
commit
bc2ca39595
1 changed files with 10 additions and 6 deletions
|
|
@ -378,7 +378,6 @@ ply_event_loop_update_source_event_mask (ply_event_loop_t *loop,
|
|||
{
|
||||
ply_list_node_t *node;
|
||||
struct epoll_event event = { 0 };
|
||||
int status;
|
||||
|
||||
assert (loop != NULL);
|
||||
assert (source != NULL);
|
||||
|
|
@ -410,7 +409,12 @@ ply_event_loop_update_source_event_mask (ply_event_loop_t *loop,
|
|||
|
||||
if (source->is_getting_polled)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = epoll_ctl (loop->epoll_fd, EPOLL_CTL_MOD, source->fd, &event);
|
||||
|
||||
if (status < 0)
|
||||
ply_trace ("failed to modify epoll event mask for fd %d: %m", source->fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -637,7 +641,6 @@ ply_event_loop_remove_source_node (ply_event_loop_t *loop,
|
|||
ply_list_node_t *source_node)
|
||||
{
|
||||
ply_event_source_t *source;
|
||||
int status;
|
||||
|
||||
source = (ply_event_source_t *) ply_list_node_get_data (source_node);
|
||||
|
||||
|
|
@ -645,7 +648,12 @@ ply_event_loop_remove_source_node (ply_event_loop_t *loop,
|
|||
|
||||
if (source->is_getting_polled)
|
||||
{
|
||||
int status;
|
||||
|
||||
status = epoll_ctl (loop->epoll_fd, EPOLL_CTL_DEL, source->fd, NULL);
|
||||
|
||||
if (status < 0)
|
||||
ply_trace ("failed to delete fd %d from epoll watch list: %m", source->fd);
|
||||
source->is_getting_polled = false;
|
||||
}
|
||||
|
||||
|
|
@ -676,9 +684,7 @@ ply_event_loop_free_sources (ply_event_loop_t *loop)
|
|||
while (node != NULL)
|
||||
{
|
||||
ply_list_node_t *next_node;
|
||||
ply_event_source_t *source;
|
||||
|
||||
source = (ply_event_source_t *) ply_list_node_get_data (node);
|
||||
next_node = ply_list_get_next_node (loop->sources, node);
|
||||
ply_event_loop_remove_source_node (loop, node);
|
||||
node = next_node;
|
||||
|
|
@ -1121,11 +1127,9 @@ static void
|
|||
ply_event_loop_free_timeout_watches (ply_event_loop_t *loop)
|
||||
{
|
||||
ply_list_node_t *node;
|
||||
double now;
|
||||
|
||||
assert (loop != NULL);
|
||||
|
||||
now = ply_get_timestamp ();
|
||||
node = ply_list_get_first_node (loop->timeout_watches);
|
||||
while (node != NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue