From fa9afb25e79f145120b107478964f40bb0d97430 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 20 Sep 2023 18:59:19 +0800 Subject: [PATCH] chore: code optimization for mutex --- source/os/src/osThread.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/os/src/osThread.c b/source/os/src/osThread.c index 2080677140..6f07e24eed 100644 --- a/source/os/src/osThread.c +++ b/source/os/src/osThread.c @@ -234,9 +234,7 @@ int32_t taosThreadMutexLock(TdThreadMutex *mutex) { return 0; #else THREAD_PTR_CHECK(mutex) - int result = pthread_mutex_lock(mutex); - assert(result == 0); - return result; + return pthread_mutex_lock(mutex); #endif } @@ -260,9 +258,7 @@ int32_t taosThreadMutexUnlock(TdThreadMutex *mutex) { return 0; #else THREAD_PTR_CHECK(mutex) - int result = pthread_mutex_unlock(mutex); - assert(result == 0); - return result; + return pthread_mutex_unlock(mutex); #endif }