Skip to content

Commit

Permalink
portal-impl: Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin authored and GeorgesStavracas committed Oct 30, 2024
1 parent 9137e0e commit 4f928ee
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/portal-impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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 ();

Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 4f928ee

Please sign in to comment.