[MPlayer-cvslog] r37776 - trunk/input/appleir.c

reimar subversion at mplayerhq.hu
Sat Feb 20 14:28:59 CET 2016


Author: reimar
Date: Sat Feb 20 14:28:58 2016
New Revision: 37776

Log:
appleir: check for ioctl error.

Modified:
   trunk/input/appleir.c

Modified: trunk/input/appleir.c
==============================================================================
--- trunk/input/appleir.c	Sat Feb 20 14:26:38 2016	(r37775)
+++ trunk/input/appleir.c	Sat Feb 20 14:28:58 2016	(r37776)
@@ -103,8 +103,8 @@ int mp_input_appleir_init (char *dev)
       if (fd < 0)
         continue;
 
-      ioctl (fd, EVIOCGID, &id);
-      if (id.bustype == BUS_USB &&
+      if (ioctl(fd, EVIOCGID, &id) != -1 &&
+          id.bustype == BUS_USB &&
           id.vendor  == USB_VENDOR_APPLE &&
           (id.product == USB_DEV_APPLE_IR ||id.product == USB_DEV_APPLE_IR_2))
       {


More information about the MPlayer-cvslog mailing list