summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-10-05 13:29:51 +0200
committerRay Strode <halfline@gmail.com>2022-10-28 18:31:38 +0000
commit85a43a19e1b274c46440e7a70c49a912a424a2d6 (patch)
tree16888385b1dfc32ef0e291201c45ba8247fbb318 /daemon
parent6ab0dd8d64efc9b13d8d777ef9a9379b0bae1666 (diff)
downloadgdm-85a43a19e1b274c46440e7a70c49a912a424a2d6.tar.gz
gdm-local-display-factory: Move variables to inner scopes
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-local-display-factory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index d5339409..b6f50759 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -737,7 +737,6 @@ static void
ensure_display_for_seat (GdmLocalDisplayFactory *factory,
const char *seat_id)
{
- int ret;
gboolean seat_supports_graphics;
gboolean is_seat0;
g_auto (GStrv) session_types = NULL;
@@ -746,7 +745,6 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
GdmDisplay *display = NULL;
g_autofree char *login_session_id = NULL;
g_autofree gchar *preferred_display_server = NULL;
- gboolean falling_back = FALSE;
gboolean waiting_on_udev = FALSE;
preferred_display_server = get_preferred_display_server (factory);
@@ -761,6 +759,8 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
#endif
if (!waiting_on_udev) {
+ int ret;
+
ret = sd_seat_can_graphical (seat_id);
if (ret < 0) {
@@ -782,6 +782,8 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
is_seat0 = g_strcmp0 (seat_id, "seat0") == 0;
if (is_seat0) {
+ gboolean falling_back;
+
falling_back = factory->num_failures > 0;
session_types = gdm_local_display_factory_get_session_types (factory, falling_back);