cleanup: Use g_clear_handle_id() for g_source_remove()

It makes sure we do not forget to zero the id and lets us avoid
zero checks before. We use it for all new code, lets clean up the
existing code base.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/845
This commit is contained in:
Robert Mader
2019-11-22 01:42:14 +01:00
parent 9132063b87
commit c48330a986
10 changed files with 16 additions and 59 deletions

View File

@ -218,8 +218,7 @@ shell_perf_log_set_enabled (ShellPerfLog *perf_log,
}
else
{
g_source_remove (perf_log->statistics_timeout_id);
perf_log->statistics_timeout_id = 0;
g_clear_handle_id (&perf_log->statistics_timeout_id, g_source_remove);
}
}
}