[vlc-commits] android/thread: don't use custom assert

Thomas Guillem git at videolan.org
Fri Mar 10 17:40:11 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 10 17:11:10 2017 +0100| [d3b4d99e45d3184834cb5bfcd1e26b6b3fadf43d] | committer: Thomas Guillem

android/thread: don't use custom assert

The backtrace produced by the failing assert is enough.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3b4d99e45d3184834cb5bfcd1e26b6b3fadf43d
---

 src/android/thread.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/android/thread.c b/src/android/thread.c
index 8e12115..b2ba655 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -49,14 +49,6 @@
 #endif
 
 /* debug */
-#define vlc_assert(x) do { \
-    if (unlikely(!(x))) { \
-    __android_log_print(ANDROID_LOG_ERROR, "vlc", "assert failed %s:%d: %s", \
-        __FILE__, __LINE__, #x \
-        ); \
-        abort(); \
-    } \
-} while(0)
 
 #ifndef NDEBUG
 static void
@@ -129,7 +121,7 @@ void vlc_mutex_destroy (vlc_mutex_t *p_mutex)
 #ifndef NDEBUG
 void vlc_assert_locked (vlc_mutex_t *p_mutex)
 {
-    vlc_assert (pthread_mutex_lock (p_mutex) == EDEADLK);
+    assert (pthread_mutex_lock (p_mutex) == EDEADLK);
 }
 #endif
 



More information about the vlc-commits mailing list