aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
committerMax Kellermann <max@duempel.org>2008-10-08 11:03:39 +0200
commitb084bc28ede5d397e88a4e2bdad8c07a55069589 (patch)
treed61d58cc73ed7d591df05fee2f4a48682e8d9c8c /src/notify.c
parent71351160b1b6fd4203f27f9159ae39a476483e1a (diff)
downloadmpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.gz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.tar.xz
mpd-b084bc28ede5d397e88a4e2bdad8c07a55069589.zip
use the "bool" data type instead of "int"
"bool" should be used in C99 programs for boolean values.
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/notify.c b/src/notify.c
index e6bb98bba..7d25db517 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -31,7 +31,7 @@ void notify_init(struct notify *notify)
if (ret != 0)
FATAL("pthread_mutex_init() failed");
- notify->pending = 0;
+ notify->pending = false;
}
void notify_deinit(struct notify *notify)
@@ -45,14 +45,14 @@ void notify_wait(struct notify *notify)
pthread_mutex_lock(&notify->mutex);
while (!notify->pending)
pthread_cond_wait(&notify->cond, &notify->mutex);
- notify->pending = 0;
+ notify->pending = false;
pthread_mutex_unlock(&notify->mutex);
}
void notify_signal(struct notify *notify)
{
pthread_mutex_lock(&notify->mutex);
- notify->pending = 1;
+ notify->pending = true;
pthread_cond_signal(&notify->cond);
pthread_mutex_unlock(&notify->mutex);
}