summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-27 15:28:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-27 15:30:58 +0200
commit3daf0c7e77a6438d11d23a31b5f21577c19cdcd8 (patch)
treec33f377c7e3f569018191dd4ca2cb26bbc59b3a5
parentd3273a06eb5aa7515e5e67ed399c3a699b555485 (diff)
More loplugin:simplifybool
Change-Id: I51e7a11149676a8b5396d9eb993a509859cdf725
-rw-r--r--jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx8
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx2
-rw-r--r--jvmfwk/source/elements.cxx6
-rw-r--r--jvmfwk/source/framework.cxx9
-rw-r--r--jvmfwk/source/fwkbase.cxx4
8 files changed, 17 insertions, 18 deletions
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 8b92e158a68a..f179bdec7644 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -76,7 +76,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if (pInfo == NULL)
{
- if (false == findAndSelect(&pInfo))
+ if (!findAndSelect(&pInfo))
return -1;
}
else
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 9fc69d65570e..07ec21e85270 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -281,7 +281,7 @@ bool GnuInfo::initialize(vector<pair<OUString, OUString> > props)
break;
}
}
- if (bLdPath == false)
+ if (!bLdPath)
return false;
return true;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 54ba4d048c16..667440c86ac9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -94,7 +94,7 @@ bool SunVersion::init(const char *szVersion)
(nPart < 2 && *pCur == '.') )
&& (
//prevent 1.4.0. 1.4.0-
- pCur + 1 == pEnd ? isdigit(*(pCur)) : true) )
+ pCur + 1 != pEnd || isdigit(*(pCur))) )
{
int len = pCur - pLast;
if (len >= 127)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index eb43be025176..c72668d78070 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -976,11 +976,11 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
bool bProcessRun= false;
- if (getJavaProps(sFilePath,
+ if (!getJavaProps(sFilePath,
#ifdef JVM_ONE_PATH_CHECK
sResolvedDir,
#endif
- props, & bProcessRun) == false)
+ props, & bProcessRun))
{
//The java executable could not be run or the system properties
//could not be retrieved. We can assume that this java is corrupt.
@@ -991,7 +991,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
//in jdk/jre/bin. We do not search any further, because we assume that if one java
//does not work then the other does not work as well. This saves us to run java
//again which is quite costly.
- if (bProcessRun == true)
+ if (bProcessRun)
{
// 1.3.1 special treatment: jdk/bin/java and /jdk/jre/bin/java are links to
//a script, named .java_wrapper. The script starts jdk/bin/sparc/native_threads/java
@@ -1084,7 +1084,7 @@ Reference<VendorBase> createInstance(createInstance_func pFunc,
Reference<VendorBase> aBase = (*pFunc)();
if (aBase.is())
{
- if (aBase->initialize(properties) == false)
+ if (!aBase->initialize(properties))
aBase = 0;
}
return aBase;
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index f91f75ec9aba..5ee17d7bd869 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -173,7 +173,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
break;
}
}
- if (bLdPath == false)
+ if (!bLdPath)
return false;
return true;
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 03269123c6d0..253ad0da123b 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -777,7 +777,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo)
bNil = false;
else
throw FrameworkException(JFW_E_ERROR, sExcMsg);
- if (bNil == true)
+ if (bNil)
return;
//Get javaInfo@manuallySelected attribute
@@ -890,7 +890,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc,
//javaInfo@autoSelect
xmlSetProp(pJavaInfoNode, reinterpret_cast<xmlChar const *>("autoSelect"),
- reinterpret_cast<xmlChar const *>(bAutoSelect == true ? "true" : "false"));
+ reinterpret_cast<xmlChar const *>(bAutoSelect ? "true" : "false"));
//Set xsi:nil in javaInfo element to false
//the xmlNs pointer must not be destroyed
@@ -977,7 +977,7 @@ void CNodeJavaInfo::writeToNode(xmlDoc* pDoc,
JavaInfo * CNodeJavaInfo::makeJavaInfo() const
{
- if (bNil == true || m_bEmptyNode == true)
+ if (bNil || m_bEmptyNode)
return NULL;
JavaInfo * pInfo = static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
if (pInfo == NULL)
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index e621e0e536b8..ddfc4bfbea55 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -276,8 +276,7 @@ javaFrameworkError SAL_CALL jfw_startVM(
//Check if the selected Java was set in this process. If so it
//must not have the requirments flag JFW_REQUIRE_NEEDRESTART
if ((aInfo->nRequirements & JFW_REQUIRE_NEEDRESTART)
- &&
- (jfw::wasJavaSelectedInSameProcess() == true))
+ && jfw::wasJavaSelectedInSameProcess())
return JFW_E_NEED_RESTART;
vmParams = settings.getVmParametersUtf8();
@@ -533,7 +532,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
jfw_freeJavaInfo(arInfos[j]);
rtl_freeMemory(arInfos);
- if (bInfoFound == true)
+ if (bInfoFound)
break;
//All Java installations found by the current plug-in lib
//do not provide the required features. Try the next plug-in
@@ -591,7 +590,7 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
}
}
}//end iterate over paths
- if (bInfoFound == true)
+ if (bInfoFound)
break;
}// end iterate plug-ins
}
@@ -837,7 +836,7 @@ javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled)
if (jfw::getMode() == jfw::JFW_MODE_DIRECT)
return JFW_E_DIRECT_MODE;
- if (g_bEnabledSwitchedOn == false && bEnabled == sal_True)
+ if (!g_bEnabledSwitchedOn && bEnabled == sal_True)
{
//When the process started then Enabled was false.
//This is first time enabled is set to true.
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 871b96cb2267..9c79344496d8 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -418,7 +418,7 @@ JFW_MODE getMode()
static bool g_bMode = false;
static JFW_MODE g_mode = JFW_MODE_APPLICATION;
- if (g_bMode == false)
+ if (!g_bMode)
{
//check if either of the "direct mode" bootstrap variables is set
bool bDirectMode = true;
@@ -555,7 +555,7 @@ void setJavaSelected()
bool wasJavaSelectedInSameProcess()
{
//g_setJavaProcId not set means no Java selected
- if (g_bJavaSet == true)
+ if (g_bJavaSet)
return true;
return false;
}