From b084bc28ede5d397e88a4e2bdad8c07a55069589 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:03:39 +0200 Subject: use the "bool" data type instead of "int" "bool" should be used in C99 programs for boolean values. --- src/notify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/notify.c') 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(¬ify->mutex); while (!notify->pending) pthread_cond_wait(¬ify->cond, ¬ify->mutex); - notify->pending = 0; + notify->pending = false; pthread_mutex_unlock(¬ify->mutex); } void notify_signal(struct notify *notify) { pthread_mutex_lock(¬ify->mutex); - notify->pending = 1; + notify->pending = true; pthread_cond_signal(¬ify->cond); pthread_mutex_unlock(¬ify->mutex); } -- cgit v1.2.3