[gnome-remote-desktop] session-vnc: Use g_clear_handle_id to clear close_session_idle_id
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session-vnc: Use g_clear_handle_id to clear close_session_idle_id
- Date: Tue, 12 Jan 2021 13:51:55 +0000 (UTC)
commit d05e7bbbc7ecd9cb075b49722baf7c20449ac621
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Fri Jan 1 19:39:56 2021 +0100
session-vnc: Use g_clear_handle_id to clear close_session_idle_id
As with RDP, it's shorter, more compact and does the same as manually
checking the id, removing the source if the id is non-zero and setting
the id to 0.
src/grd-session-vnc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c
index ba3e5ce..74fc765 100644
--- a/src/grd-session-vnc.c
+++ b/src/grd-session-vnc.c
@@ -666,11 +666,7 @@ grd_session_vnc_stop (GrdSession *session)
g_clear_pointer (&session_vnc->rfb_screen->frameBuffer, g_free);
g_clear_pointer (&session_vnc->rfb_screen, rfbScreenCleanup);
- if (session_vnc->close_session_idle_id)
- {
- g_source_remove (session_vnc->close_session_idle_id);
- session_vnc->close_session_idle_id = 0;
- }
+ g_clear_handle_id (&session_vnc->close_session_idle_id, g_source_remove);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]