[gnome-software: 3/9] rpm-ostree: Simplify clearing a handle




commit 93a60f102d9548b91c8b5c044240bdf3649f0426
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Oct 15 13:53:29 2021 +0100

    rpm-ostree: Simplify clearing a handle
    
    This introduces no functional changes.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index d9bf29d0d..bd68c09c1 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -59,10 +59,7 @@ gs_plugin_rpm_ostree_dispose (GObject *object)
 {
        GsPluginRpmOstree *self = GS_PLUGIN_RPM_OSTREE (object);
 
-       if (self->inactive_timeout_id) {
-               g_source_remove (self->inactive_timeout_id);
-               self->inactive_timeout_id = 0;
-       }
+       g_clear_handle_id (&self->inactive_timeout_id, g_source_remove);
        g_clear_object (&self->os_proxy);
        g_clear_object (&self->sysroot_proxy);
        g_clear_object (&self->ot_sysroot);


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