diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 18:03:34 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 18:03:34 +0000 |
commit | 7eef20482c377dcf2fcf857b71a1d6c5e8d6a17e (patch) | |
tree | de648e20ee7c9aca6b5355ba611368df5aca0640 /base/lock_impl_posix.cc | |
parent | 339c6794663eaceb331b01569d372ca9ffb032d4 (diff) | |
download | chromium_src-7eef20482c377dcf2fcf857b71a1d6c5e8d6a17e.zip chromium_src-7eef20482c377dcf2fcf857b71a1d6c5e8d6a17e.tar.gz chromium_src-7eef20482c377dcf2fcf857b71a1d6c5e8d6a17e.tar.bz2 |
Change DCHECK( == 0) to DCHECK_EQ in the posix lock implementation.
It is helpful to see the actual value during a check failure.
Review URL: http://codereview.chromium.org/42225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/lock_impl_posix.cc')
-rw-r--r-- | base/lock_impl_posix.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/lock_impl_posix.cc b/base/lock_impl_posix.cc index 59f7793..355149f 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); } |