Skip to content

Commit

Permalink
portal-impl: Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Oct 5, 2024
1 parent bcb4843 commit 52f5814
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 @@ -647,8 +647,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 @@ -671,9 +669,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 @@ -697,7 +695,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 @@ -721,8 +719,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 @@ -750,9 +746,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 @@ -779,7 +775,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 52f5814

Please sign in to comment.