From: Lennart Poettering Date: Wed, 9 Aug 2023 08:51:19 +0000 (+0200) Subject: polkit: use LIST_POP where appropriate X-Git-Tag: v255-rc1~773^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a901c71f5ca6c6656fe7d4f2baa813eda791a46;p=thirdparty%2Fsystemd.git polkit: use LIST_POP where appropriate --- diff --git a/src/shared/bus-polkit.c b/src/shared/bus-polkit.c index b7f7c2b47aa..383ebd9edef 100644 --- a/src/shared/bus-polkit.c +++ b/src/shared/bus-polkit.c @@ -220,10 +220,8 @@ static AsyncPolkitQuery *async_polkit_query_free(AsyncPolkitQuery *q) { sd_event_source_disable_unref(q->defer_event_source); - while ((a = q->authorized_actions)) { - LIST_REMOVE(authorized, q->authorized_actions, a); + while ((a = LIST_POP(authorized, q->authorized_actions))) async_polkit_query_action_free(a); - } async_polkit_query_action_free(q->denied_action); async_polkit_query_action_free(q->error_action);