util: make notifer_remove() safer

Allow to call multiple time notifier_remove() safely.
This shoudn't impact performance in any measurable way...

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260623-b4-ui-v4-8-4656aec3398d@redhat.com>
This commit is contained in:
Marc-André Lureau
2026-06-23 11:44:23 +04:00
parent 1599015a7a
commit e1fa7f123f

View File

@@ -28,7 +28,7 @@ void notifier_list_add(NotifierList *list, Notifier *notifier)
void notifier_remove(Notifier *notifier)
{
QLIST_REMOVE(notifier, node);
QLIST_SAFE_REMOVE(notifier, node);
}
void notifier_list_notify(NotifierList *list, void *data)