#include <config.h>
#endif
+#include <pulse/xmalloc.h>
+
#include <pulsecore/macro.h>
#include "hook-list.h"
slot = pa_xnew(pa_hook_slot, 1);
slot->hook = hook;
- slot->dead = FALSE;
+ slot->dead = false;
slot->callback = cb;
slot->data = data;
slot->priority = prio;
pa_assert(!slot->dead);
if (slot->hook->n_firing > 0) {
- slot->dead = TRUE;
+ slot->dead = true;
slot->hook->n_dead++;
} else
slot_free(slot->hook, slot);
hook->n_firing ++;
- for (slot = hook->slots; slot; slot = slot->next) {
+ PA_LLIST_FOREACH(slot, hook->slots) {
if (slot->dead)
continue;
return result;
}
-pa_bool_t pa_hook_is_firing(pa_hook *hook) {
+bool pa_hook_is_firing(pa_hook *hook) {
pa_assert(hook);
return hook->n_firing > 0;