diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-09-28 13:50:12 +0200 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-10-27 12:56:03 +0000 |
commit | 33bccd1ee5d5a5a5e2f1cf90bf461764e5680597 (patch) | |
tree | d5fc65d870267b5c7d94f1a2de5c65e1c613782b /daemon/gdm-display.c | |
parent | 9e576280156caf2ef85c2049107c78935491b5a4 (diff) | |
download | gdm-33bccd1ee5d5a5a5e2f1cf90bf461764e5680597.tar.gz |
gdm-display: Use g_clear_handle_id
Diffstat (limited to 'daemon/gdm-display.c')
-rw-r--r-- | daemon/gdm-display.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c index 492cfb08..123cce4a 100644 --- a/daemon/gdm-display.c +++ b/daemon/gdm-display.c @@ -619,10 +619,8 @@ gdm_display_finish (GdmDisplay *self) g_return_val_if_fail (GDM_IS_DISPLAY (self), FALSE); priv = gdm_display_get_instance_private (self); - if (priv->finish_idle_id != 0) { - g_source_remove (priv->finish_idle_id); - priv->finish_idle_id = 0; - } + + g_clear_handle_id (&priv->finish_idle_id, g_source_remove); _gdm_display_set_status (self, GDM_DISPLAY_FINISHED); @@ -1250,10 +1248,7 @@ gdm_display_dispose (GObject *object) g_debug ("GdmDisplay: Disposing display"); - if (priv->finish_idle_id != 0) { - g_source_remove (priv->finish_idle_id); - priv->finish_idle_id = 0; - } + g_clear_handle_id (&priv->finish_idle_id, g_source_remove); g_clear_object (&priv->launch_environment); g_clear_pointer (&priv->supported_session_types, g_strfreev); |