[gdm/wip/xserver-in-session: 23/54] local-display-factory: drop some superfluous code



commit 3524ca38892c6104e2ca63afd84411fc953336bf
Author: Ray Strode <rstrode redhat com>
Date:   Mon Feb 16 11:27:10 2015 -0500

    local-display-factory: drop some superfluous code
    
    The store_display function takes a display number as
    an argument, it then uses that display number to reserve
    a slot in the "used display numbers" hash table.
    
    There's no reason for it to do this though, because the
    slot is already reserved when the next available display
    number is looked up in take_next_display_number.
    
    This commit drops the superfluous code.

 daemon/gdm-local-display-factory.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index bf5a220..d49bf25 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -177,7 +177,6 @@ on_display_disposed (GdmLocalDisplayFactory *factory,
 
 static void
 store_display (GdmLocalDisplayFactory *factory,
-               guint32                 num,
                GdmDisplay             *display)
 {
         GdmDisplayStore *store;
@@ -189,9 +188,6 @@ store_display (GdmLocalDisplayFactory *factory,
 
         store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
         gdm_display_store_add (store, display);
-
-        /* now fill our reserved spot */
-        g_hash_table_insert (factory->priv->used_display_numbers, GUINT_TO_POINTER (num), NULL);
 }
 
 static const char *
@@ -242,7 +238,7 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact
                       "allow-timed-login", FALSE,
                       NULL);
 
-        store_display (factory, num, display);
+        store_display (factory, display);
 
         if (! gdm_display_manage (display)) {
                 display = NULL;
@@ -377,7 +373,7 @@ create_display (GdmLocalDisplayFactory *factory,
         g_object_set (display, "seat-id", seat_id, NULL);
         g_object_set (display, "is-initial", initial, NULL);
 
-        store_display (factory, num, display);
+        store_display (factory, display);
 
         /* let store own the ref */
         g_object_unref (display);


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