aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@redembedded.com>2018-03-24 19:33:41 +0100
committerMichał Łyszczek <michal.lyszczek@redembedded.com>2018-03-24 19:33:41 +0100
commiteccc3c90d32800dc79530d73d2bffb6d15919e29 (patch)
treeb5df3456402123d99ebb07a42c40b1b2d5a1d54e
parent59ceb09c08f34428bc03628ae5b70d27b4da2556 (diff)
downloadlibrb-eccc3c90d32800dc79530d73d2bffb6d15919e29.tar.gz
librb-eccc3c90d32800dc79530d73d2bffb6d15919e29.tar.bz2
librb-eccc3c90d32800dc79530d73d2bffb6d15919e29.zip
fix: put el_cleanup_p in #if ENABLE_THREADS
it is not used without that flag anyway so
-rw-r--r--rb/rb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rb/rb.c b/rb/rb.c
index 34f9b9f..6d78446 100644
--- a/rb/rb.c
+++ b/rb/rb.c
@@ -716,13 +716,13 @@ error_lock:
Cleans up resources allocated by pthread stuff
========================================================================== */
+#if ENABLE_THREADS
static int rb_cleanup_p
(
struct rb *rb /* rb object */
)
{
-#if ENABLE_THREADS
/*
* check if user called rb_stop, if not (rb->stopped will be -1), we trust
* caller made sure all threads are stopped before calling destroy.
@@ -743,11 +743,11 @@ static int rb_cleanup_p
pthread_cond_destroy(&rb->wait_data);
pthread_cond_destroy(&rb->wait_room);
pthread_mutex_destroy(&rb->lock);
-#endif
return 0;
}
+#endif
/* ==========================================================================
__ __ _