From 18cfb808bd68c9189c48c78b56dce90ea1553f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 7 Jan 2024 02:36:05 +0100 Subject: [PATCH] spa: alsa,v4l2: simplify inotify read loop exit condition The removed condition is strictly a subset of the condition that is checked one line below, so remove it. --- spa/plugins/alsa/alsa-udev.c | 2 -- spa/plugins/v4l2/v4l2-udev.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c index 58ff5032d..be40bb26b 100644 --- a/spa/plugins/alsa/alsa-udev.c +++ b/spa/plugins/alsa/alsa-udev.c @@ -823,8 +823,6 @@ static void impl_on_notify_events(struct spa_source *source) void *p, *e; len = read(source->fd, &buf, sizeof(buf)); - if (len < 0 && errno != EAGAIN) - break; if (len <= 0) break; diff --git a/spa/plugins/v4l2/v4l2-udev.c b/spa/plugins/v4l2/v4l2-udev.c index dc82fc447..733f3da2a 100644 --- a/spa/plugins/v4l2/v4l2-udev.c +++ b/spa/plugins/v4l2/v4l2-udev.c @@ -428,8 +428,6 @@ static void impl_on_notify_events(struct spa_source *source) void *p, *e; len = read(source->fd, &buf, sizeof(buf)); - if (len < 0 && errno != EAGAIN) - break; if (len <= 0) break;