Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2703)

Unified Diff: base/lock_impl_posix.cc

Issue 42225: Change some DCHECK( == 0), to DCHECK_EQ in the posix lock implementation. (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/lock_impl_posix.cc
diff --git a/base/lock_impl_posix.cc b/base/lock_impl_posix.cc
index 59f7793feee122d7ed41caf021568e7409c7c446..355149f2602ee8b5bbdd15072c8f47960da2d2e6 100644
--- a/base/lock_impl_posix.cc
+++ b/base/lock_impl_posix.cc
@@ -13,13 +13,13 @@ LockImpl::LockImpl() {
// In debug, setup attributes for lock error checking.
pthread_mutexattr_t mta;
int rv = pthread_mutexattr_init(&mta);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
rv = pthread_mutex_init(&os_lock_, &mta);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
rv = pthread_mutexattr_destroy(&mta);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
#else
// In release, go with the default lock attributes.
pthread_mutex_init(&os_lock_, NULL);
@@ -28,7 +28,7 @@ LockImpl::LockImpl() {
LockImpl::~LockImpl() {
int rv = pthread_mutex_destroy(&os_lock_);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
}
bool LockImpl::Try() {
@@ -39,10 +39,10 @@ bool LockImpl::Try() {
void LockImpl::Lock() {
int rv = pthread_mutex_lock(&os_lock_);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
}
void LockImpl::Unlock() {
int rv = pthread_mutex_unlock(&os_lock_);
- DCHECK(rv == 0);
+ DCHECK_EQ(rv, 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698