From a4e7042176846d49f52cb4826a0d9692d55f04d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 19 Feb 2022 11:58:13 +0100 Subject: [PATCH] spa: support: loop: do not return early in case of an error It is expected that `nfds` is non-negative in the vast majority of cases, so hopefully the runtime performance will not be significantly affected by removing the check. This way it is guaranteed that the destroy list is processed. --- spa/plugins/support/loop.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/spa/plugins/support/loop.c b/spa/plugins/support/loop.c index c1c05cb85..81fd7be0f 100644 --- a/spa/plugins/support/loop.c +++ b/spa/plugins/support/loop.c @@ -350,9 +350,6 @@ static int loop_iterate(void *object, int timeout) spa_loop_control_hook_after(&impl->hooks_list); - if (SPA_UNLIKELY(nfds < 0)) - return nfds; - /* first we set all the rmasks, then call the callbacks. The reason is that * some callback might also want to look at other sources it manages and * can then reset the rmask to suppress the callback */