summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-12-27 22:57:31 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-12-27 22:58:07 +0100
commit8c3c491d4f419b496ac25f306b4b4ea7966465d7 (patch)
tree3105d4f9a22619521d4b632265d730ef69373068 /cppu
parenta8fdb0ba4d83e7df5b8c325aabf4ba2fa28e9545 (diff)
Some cppcheck cleaning
Change-Id: Iac1c26d031e8196ef93cb403dc60f07e0eef6380
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/AffineBridge/AffineBridge.cxx4
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx7
-rw-r--r--cppu/source/UnsafeBridge/UnsafeBridge.cxx7
3 files changed, 7 insertions, 11 deletions
diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx
index 7d62b46cfa58..86d79f1f7564 100644
--- a/cppu/source/AffineBridge/AffineBridge.cxx
+++ b/cppu/source/AffineBridge/AffineBridge.cxx
@@ -319,9 +319,7 @@ void AffineBridge::v_leave(void)
int AffineBridge::v_isValid(rtl::OUString * pReason)
{
- int result = 1;
-
- result = m_enterCount > 0;
+ int result = m_enterCount > 0;
if (!result)
*pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not entered"));
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index 0d161fb88321..a1cacf442db8 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -109,12 +109,11 @@ void LogBridge::v_leave(void)
int LogBridge::v_isValid(rtl::OUString * pReason)
{
- int result = 1;
-
- result = m_count > 0;
+ int result = m_count > 0;
if (!result)
+ {
*pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not entered"));
-
+ }
else
{
result = m_threadId == osl_getThreadIdentifier(NULL);
diff --git a/cppu/source/UnsafeBridge/UnsafeBridge.cxx b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
index 96a531068123..382ed3e36f7f 100644
--- a/cppu/source/UnsafeBridge/UnsafeBridge.cxx
+++ b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
@@ -118,12 +118,11 @@ void UnsafeBridge::v_leave(void)
int UnsafeBridge::v_isValid(rtl::OUString * pReason)
{
- int result = 1;
-
- result = m_count > 0;
+ int result = m_count > 0;
if (!result)
+ {
*pReason = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not entered"));
-
+ }
else
{
result = m_threadId == osl_getThreadIdentifier(NULL);