diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-10-05 13:29:52 +0200 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-10-28 18:31:38 +0000 |
commit | f8a316ee7789e5cc11040d7a1d28c25b267736b0 (patch) | |
tree | fbee41d0e0c200e3b06c9911378dbe5061179814 | |
parent | 85a43a19e1b274c46440e7a70c49a912a424a2d6 (diff) | |
download | gdm-f8a316ee7789e5cc11040d7a1d28c25b267736b0.tar.gz |
gdm-local-display-factory: Remove redundant check
There is no case where seat_supports_graphics is TRUE while session_types is NULL.
Thus, after the following check:
```
if (!seat_supports_graphics)
return;
```
we can assume that session_types won't be NULL.
-rw-r--r-- | daemon/gdm-local-display-factory.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index b6f50759..51d470d8 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -846,12 +846,14 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory, if (!seat_supports_graphics) return; - if (session_types != NULL) - g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested", - session_types[0], seat_id); - else if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0) + g_assert (session_types != NULL); + + if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0) g_debug ("GdmLocalDisplayFactory: Legacy Xorg login display for seat %s requested", seat_id); + else + g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested", + session_types[0], seat_id); store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); |