-- assert fixes for thrift concurrency lib

Summary:
- cannot assume that assert.h is defined

Reviewed By: marc k

Test Plan: everything compiles

Notes:
- need to reflect these changes in libfacebook/fbthread


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665073 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp
index 3d74d75..0f650a1 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -20,14 +20,16 @@
 class Mutex::impl {
  public:
   impl() : initialized_(false) {
-    assert(pthread_mutex_init(&pthread_mutex_, NULL) == 0);
+    int ret = pthread_mutex_init(&pthread_mutex_, NULL);
+    assert(ret);
     initialized_ = true;
   }
 
   ~impl() {
     if (initialized_) {
       initialized_ = false;
-      assert(pthread_mutex_destroy(&pthread_mutex_) == 0);
+      int ret = pthread_mutex_destroy(&pthread_mutex_);
+      assert(ret);
     }
   }