launcher: Fix indentation

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2151>
This commit is contained in:
Jonas Ådahl 2021-12-10 23:32:24 +01:00 committed by Marge Bot
parent c8c9d49f79
commit 8b628f0ae4

View File

@ -116,43 +116,43 @@ find_systemd_session (gchar **session_id,
return FALSE; return FALSE;
} }
if (n_sessions == 0) if (n_sessions == 0)
{ {
g_set_error (error, g_set_error (error,
G_IO_ERROR, G_IO_ERROR,
G_IO_ERROR_NOT_FOUND, G_IO_ERROR_NOT_FOUND,
"User %d has no sessions", "User %d has no sessions",
getuid ()); getuid ());
return FALSE; return FALSE;
} }
for (int i = 0; i < n_sessions; ++i) for (int i = 0; i < n_sessions; ++i)
{ {
saved_errno = sd_session_get_class (sessions[i], &class); saved_errno = sd_session_get_class (sessions[i], &class);
if (saved_errno < 0) if (saved_errno < 0)
{ {
g_warning ("Couldn't get class for session '%d': %s", g_warning ("Couldn't get class for session '%d': %s",
i, i,
g_strerror (-saved_errno)); g_strerror (-saved_errno));
continue; continue;
} }
if (g_strcmp0 (class, "greeter") == 0) if (g_strcmp0 (class, "greeter") == 0)
{ {
local_session_id = g_strdup (sessions[i]); local_session_id = g_strdup (sessions[i]);
break; break;
} }
} }
if (!local_session_id) if (!local_session_id)
{ {
g_set_error (error, g_set_error (error,
G_IO_ERROR, G_IO_ERROR,
G_IO_ERROR_NOT_FOUND, G_IO_ERROR_NOT_FOUND,
"Couldn't find a session or a greeter session for user %d", "Couldn't find a session or a greeter session for user %d",
getuid ()); getuid ());
return FALSE; return FALSE;
} }
} }
else else
{ {