[vlc-commits] LIRC: keep same pollfd
Rémi Denis-Courmont
git at videolan.org
Tue Nov 27 19:24:48 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 27 19:50:01 2012 +0200| [dcd19cba03bb9c0c37281dffde7a74b5ede3ef65] | committer: Rémi Denis-Courmont
LIRC: keep same pollfd
There is no need to reinitialize the structure.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcd19cba03bb9c0c37281dffde7a74b5ede3ef65
---
modules/control/lirc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/control/lirc.c b/modules/control/lirc.c
index 81a8885..615f97c 100644
--- a/modules/control/lirc.c
+++ b/modules/control/lirc.c
@@ -159,16 +159,18 @@ 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;
+ break;
}
/* Process */
More information about the vlc-commits
mailing list