From 4f928ee37a95fa669f2e0f9bb8eb060ac6cf13d0 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sat, 5 Oct 2024 18:26:48 +0100 Subject: [PATCH] portal-impl: Cosmetics --- src/portal-impl.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/portal-impl.c b/src/portal-impl.c index b45c589df..9e450501b 100644 --- a/src/portal-impl.c +++ b/src/portal-impl.c @@ -653,8 +653,6 @@ PortalImplementation * find_portal_implementation (const char *interface) { const char **desktops; - GList *l; - int i; if (portal_interface_prefers_none (interface)) return NULL; @@ -677,9 +675,9 @@ find_portal_implementation (const char *interface) desktops = get_current_lowercase_desktops (); /* Fallback to the old UseIn key */ - for (i = 0; desktops[i] != NULL; i++) + for (size_t i = 0; desktops[i] != NULL; i++) { - for (l = implementations; l != NULL; l = l->next) + for (GList *l = implementations; l != NULL; l = l->next) { PortalImplementation *impl = l->data; @@ -703,7 +701,7 @@ find_portal_implementation (const char *interface) * try to fall back to x-d-p-gtk, which has historically been the portal * UI backend used by desktop environments with no backend of their own. * If it isn't installed, that is not an error: we just don't use it. */ - for (l = implementations; l != NULL; l = l->next) + for (GList *l = implementations; l != NULL; l = l->next) { PortalImplementation *impl = l->data; @@ -727,8 +725,6 @@ find_all_portal_implementations (const char *interface) { const char **desktops; GPtrArray *impls; - GList *l; - int i; impls = g_ptr_array_new (); @@ -756,9 +752,9 @@ find_all_portal_implementations (const char *interface) desktops = get_current_lowercase_desktops (); /* Fallback to the old UseIn key */ - for (i = 0; desktops[i] != NULL; i++) + for (size_t i = 0; desktops[i] != NULL; i++) { - for (l = implementations; l != NULL; l = l->next) + for (GList *l = implementations; l != NULL; l = l->next) { PortalImplementation *impl = l->data; @@ -785,7 +781,7 @@ find_all_portal_implementations (const char *interface) * try to fall back to x-d-p-gtk, which has historically been the portal * UI backend used by desktop environments with no backend of their own. * If it isn't installed, that is not an error: we just don't use it. */ - for (l = implementations; l != NULL; l = l->next) + for (GList *l = implementations; l != NULL; l = l->next) { PortalImplementation *impl = l->data;