From b12f24efb9e278e5f56f9d5731bd6f326ea2b583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 6 Mar 2022 15:21:21 +0100 Subject: [PATCH] spa: support: loop: don't initialize source->loop There is no need to initialize the `loop`, `rmask`, or `priv` members of a `spa_source` because `loop_add_source()` will take care of that. --- spa/plugins/support/loop.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spa/plugins/support/loop.c b/spa/plugins/support/loop.c index c1d1494cb..ed2815bbf 100644 --- a/spa/plugins/support/loop.c +++ b/spa/plugins/support/loop.c @@ -438,7 +438,6 @@ static struct spa_source *loop_add_io(void *object, if (source == NULL) goto error_exit; - source->source.loop = &impl->loop; source->source.func = source_io_func; source->source.data = data; source->source.fd = fd; @@ -535,7 +534,6 @@ static struct spa_source *loop_add_idle(void *object, if ((res = spa_system_eventfd_create(impl->system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK)) < 0) goto error_exit_free; - source->source.loop = &impl->loop; source->source.func = source_idle_func; source->source.data = data; source->source.fd = res; @@ -590,7 +588,6 @@ static struct spa_source *loop_add_event(void *object, if ((res = spa_system_eventfd_create(impl->system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK)) < 0) goto error_exit_free; - source->source.loop = &impl->loop; source->source.func = source_event_func; source->source.data = data; source->source.fd = res; @@ -658,7 +655,6 @@ static struct spa_source *loop_add_timer(void *object, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK)) < 0) goto error_exit_free; - source->source.loop = &impl->loop; source->source.func = source_timer_func; source->source.data = data; source->source.fd = res; @@ -740,7 +736,6 @@ static struct spa_source *loop_add_signal(void *object, signal_number, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK)) < 0) goto error_exit_free; - source->source.loop = &impl->loop; source->source.func = source_signal_func; source->source.data = data; source->source.fd = res;