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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user