summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-02 11:07:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-02 14:21:52 +0000
commitab86a53623c9bf5d3abc7149aa85d0e0c8d7fd98 (patch)
tree5457981a1a0e3b0ca4f5d6104d0105c3f5b1b7ee /sal/osl
parentcf6d0fced8bc8770ca101b71187c8d0ed28ae1f1 (diff)
V805: Decreased performance
Change-Id: I822c5ebc321ebda87c238a1781a31793c1623e34
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/w32/profile.cxx4
-rw-r--r--sal/osl/w32/security.c15
2 files changed, 9 insertions, 10 deletions
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 199b618bdbc0..066aeed5be4f 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -2363,7 +2363,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
WideCharToMultiByte(CP_ACP,0, ::osl::mingw_reinterpret_cast<LPCWSTR>(aPath), -1, aTmpPath, aTmpPath.getBufSizeInSymbols(), NULL, NULL);
- if ((access(aTmpPath, 0) < 0) && (strlen(Product) > 0))
+ if ((access(aTmpPath, 0) < 0) && (Product[0] != '\0'))
{
rtl_uString * strSVFallback = NULL;
rtl_uString * strSVProfile = NULL;
@@ -2409,7 +2409,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
osl_closeProfile(hProfile);
}
- if (strlen(Buffer) > 0)
+ if (Buffer[0] != '\0')
{
dwPathLen = MultiByteToWideChar(
CP_ACP, 0, Buffer, -1, ::osl::mingw_reinterpret_cast<LPWSTR>(aPath), aPath.getBufSizeInSymbols() );
diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index cc4a1b0853a7..7d19974276f8 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -867,16 +867,15 @@ static sal_Bool SAL_CALL getUserNameImpl(oslSecurity Security, rtl_uString **str
free(pNameW);
return sal_True;
}
- else
- if (wcslen(pSecImpl->m_User) > 0)
- {
- rtl_uString_newFromStr( strName, pSecImpl->m_pNetResource->lpRemoteName);
+ else if (pSecImpl->m_User[0] != '\0')
+ {
+ rtl_uString_newFromStr(strName, pSecImpl->m_pNetResource->lpRemoteName);
- if (pNameW)
- free(pNameW);
+ if (pNameW)
+ free(pNameW);
- return sal_True;
- }
+ return sal_True;
+ }
if (pNameW)
free(pNameW);