summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/hook-list.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-10-28 19:13:50 +0000
committerLennart Poettering <lennart@poettering.net>2007-10-28 19:13:50 +0000
commita67c21f093202f142438689d3f7cfbdf4ea82eea (patch)
tree5c3295037f033904bc11ab8b3adae5b7331101e9 /src/pulsecore/hook-list.c
parent6687dd013169fd8436aa1b45ccdacff074a40d05 (diff)
merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/hook-list.c')
-rw-r--r--src/pulsecore/hook-list.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/pulsecore/hook-list.c b/src/pulsecore/hook-list.c
index 4f884187..3a6874c4 100644
--- a/src/pulsecore/hook-list.c
+++ b/src/pulsecore/hook-list.c
@@ -21,10 +21,16 @@
USA.
***/
-#include <pulsecore/hook-list.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulsecore/macro.h>
+
+#include "hook-list.h"
void pa_hook_init(pa_hook *hook, void *data) {
- assert(hook);
+ pa_assert(hook);
PA_LLIST_HEAD_INIT(pa_hook_slot, hook->slots);
hook->last = NULL;
@@ -33,8 +39,8 @@ void pa_hook_init(pa_hook *hook, void *data) {
}
static void slot_free(pa_hook *hook, pa_hook_slot *slot) {
- assert(hook);
- assert(slot);
+ pa_assert(hook);
+ pa_assert(slot);
if (hook->last == slot)
hook->last = slot->prev;
@@ -45,8 +51,8 @@ static void slot_free(pa_hook *hook, pa_hook_slot *slot) {
}
void pa_hook_free(pa_hook *hook) {
- assert(hook);
- assert(!hook->firing);
+ pa_assert(hook);
+ pa_assert(!hook->firing);
while (hook->slots)
slot_free(hook, hook->slots);
@@ -57,7 +63,7 @@ void pa_hook_free(pa_hook *hook) {
pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_cb_t cb, void *data) {
pa_hook_slot *slot;
- assert(cb);
+ pa_assert(cb);
slot = pa_xnew(pa_hook_slot, 1);
slot->hook = hook;
@@ -72,8 +78,8 @@ pa_hook_slot* pa_hook_connect(pa_hook *hook, pa_hook_cb_t cb, void *data) {
}
void pa_hook_slot_free(pa_hook_slot *slot) {
- assert(slot);
- assert(!slot->dead);
+ pa_assert(slot);
+ pa_assert(!slot->dead);
if (slot->hook->firing > 0) {
slot->dead = 1;
@@ -86,7 +92,7 @@ pa_hook_result_t pa_hook_fire(pa_hook *hook, void *data) {
pa_hook_slot *slot, *next;
pa_hook_result_t result = PA_HOOK_OK;
- assert(hook);
+ pa_assert(hook);
hook->firing ++;