Commit dcd19cba authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

LIRC: keep same pollfd

There is no need to reinitialize the structure.
parent 495b0633
......@@ -159,15 +159,17 @@ static void *Run( void *data )
intf_thread_t *p_intf = data;
intf_sys_t *p_sys = p_intf->p_sys;
struct pollfd ufd;
ufd.fd = p_sys->i_fd;
ufd.events = POLLIN;
for( ;; )
{
/* Wait for data */
struct pollfd ufd = { .fd = p_sys->i_fd, .events = POLLIN, .revents = 0 };
if( poll( &ufd, 1, -1 ) == -1 )
{
if( errno == EINTR )
continue;
else
break;
}
......
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