[vlc-commits] access: dtv: reset errno
Francois Cartegnie
git at videolan.org
Tue May 3 18:45:43 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Apr 29 14:17:30 2016 +0200| [ca43babf4483129c833da5c902d863be68bee209] | committer: Francois Cartegnie
access: dtv: reset errno
fixes erratic error return code
as ret -1/errno is set on timeout,
which can be ret -1 (frontend event only)
and an errno from another call
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca43babf4483129c833da5c902d863be68bee209
---
modules/access/dtv/linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 86b3e44..0aded5d 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -332,6 +332,7 @@ ssize_t dvb_read (dvb_device_t *d, void *buf, size_t len, int ms)
else
n = 1;
+ errno = 0;
n = vlc_poll_i11e (ufd, n, ms);
if (n == 0)
errno = EAGAIN;
More information about the vlc-commits
mailing list