From ade958043cb4d376a5b376da79ff05f70e187195 Mon Sep 17 00:00:00 2001 From: chinhodado Date: Mon, 17 Feb 2014 20:46:51 -0500 Subject: [PATCH] minor condition change there's no guarantee that the function will return 1 on success, at least not in the documentation --- base/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/mutex.h b/base/mutex.h index 14a8c576ec..fb0affa384 100644 --- a/base/mutex.h +++ b/base/mutex.h @@ -96,7 +96,7 @@ public: bool trylock() { #ifdef _WIN32 - return TryEnterCriticalSection(&mut_) == TRUE; + return TryEnterCriticalSection(&mut_) != FALSE; #else return pthread_mutex_trylock(&mut_) != EBUSY; #endif