Skip to content

Commit

Permalink
portal-impl: Simplify function
Browse files Browse the repository at this point in the history
It's only ever called with a NULL argument, so simplify that.
  • Loading branch information
GeorgesStavracas committed Oct 9, 2024
1 parent 88cbf63 commit 0288d0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/portal-impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ validate_xdg_desktop (const char *desktop)
}

static char **
get_valid_current_desktops (const char *value)
get_valid_current_desktops (void)
{
GPtrArray *valid_desktops;
const char *value;
char **tmp;

if (value == NULL)
value = g_getenv ("XDG_CURRENT_DESKTOP");
value = g_getenv ("XDG_CURRENT_DESKTOP");
if (value == NULL)
value = "";

Expand Down Expand Up @@ -146,7 +146,7 @@ get_current_lowercase_desktops (void)

if (g_once_init_enter (&result))
{
char **tmp = get_valid_current_desktops (NULL);
char **tmp = get_valid_current_desktops ();

for (size_t i = 0; tmp[i] != NULL; i++)
{
Expand Down

0 comments on commit 0288d0e

Please sign in to comment.