فهرست منبع

linux-v4l2: Correct udev fd poll event test

Parentheses are needed due to operator precedence (although the previous
code happened to work because POLLIN has the value 1).

Fixes:		91f986ec9969 ("linux-v4l2: Check udev fd events")
Ed Maste 3 سال پیش
والد
کامیت
8b370c4218
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      plugins/linux-v4l2/v4l2-udev.c

+ 1 - 1
plugins/linux-v4l2/v4l2-udev.c

@@ -140,7 +140,7 @@ static void *udev_event_thread(void *vptr)
 		if (poll(fds, 2, 1000) <= 0)
 			continue;
 
-		if (!fds[0].revents & POLLIN)
+		if (!(fds[0].revents & POLLIN))
 			continue;
 
 		dev = udev_monitor_receive_device(mon);