[gdm] session: drop ternary conditional with implicit affirmative assignment



commit 8c59c0e1dec6148ad8101702cb12258497bfbad0
Author: Ray Strode <rstrode redhat com>
Date:   Mon Feb 23 10:10:34 2015 -0500

    session: drop ternary conditional with implicit affirmative assignment
    
    In practice, it's confusing people who are casually browsing the code.

 daemon/gdm-session.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index b5d8410..a7655b2 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2422,9 +2422,15 @@ static void
 send_session_type (GdmSession *self,
                    GdmSessionConversation *conversation)
 {
+        const char *session_type = "x11";
+
+        if (self->priv->session_type != NULL) {
+                session_type = self->priv->session_type;
+        }
+
         gdm_dbus_worker_call_set_environment_variable (conversation->worker_proxy,
                                                        "XDG_SESSION_TYPE",
-                                                       self->priv->session_type? : "x11",
+                                                       session_type,
                                                        NULL, NULL, NULL);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]