mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user