aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Mutex.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-09-06 10:53:22 +0000
committerDuncan Sands <baldrick@free.fr>2009-09-06 10:53:22 +0000
commit740eb5323e449ae4b00a3f657bffaceadcbe2624 (patch)
tree5162422a9c3a3699644b9f34b51fb80fa07b18d5 /lib/System/Mutex.cpp
parent12fd767ed819e3ea34670cc6f3e790bd0d88ee94 (diff)
Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions. Patch by Erick Tryzelaar (#111). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Mutex.cpp')
-rw-r--r--lib/System/Mutex.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp
index a5e9920ae3..8ccd6e52c4 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/System/Mutex.cpp
@@ -115,8 +115,7 @@ MutexImpl::acquire()
int errorcode = pthread_mutex_lock(mutex);
return errorcode == 0;
- }
- return false;
+ } else return false;
}
bool
@@ -129,8 +128,7 @@ MutexImpl::release()
int errorcode = pthread_mutex_unlock(mutex);
return errorcode == 0;
- }
- return false;
+ } else return false;
}
bool
@@ -143,8 +141,7 @@ MutexImpl::tryacquire()
int errorcode = pthread_mutex_trylock(mutex);
return errorcode == 0;
- }
- return false;
+ } else return false;
}
}