diff options
-rw-r--r-- | cui/source/dialogs/about.cxx | 2 | ||||
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 10 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 2 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp3.c | 2 | ||||
-rw-r--r-- | sal/osl/w32/profile.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/security.c | 15 | ||||
-rw-r--r-- | sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 2 |
7 files changed, 18 insertions, 19 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 45242d3dfc58..0134af78c018 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -273,7 +273,7 @@ OUString AboutDialog::GetVersionString() sVersion += m_sBuildStr.replaceAll("$BUILDID", sBuildId); } - if (strlen(EXTRA_BUILDID) > 0) + if (EXTRA_BUILDID[0] != '\0') { sVersion += "\n" EXTRA_BUILDID; } diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 484926e7dd5c..c40110ea35f7 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -3703,13 +3703,13 @@ void HwpReader::makeHyperText(TxtBox * hbox) HyperText *hypert = hwpfile.GetHyperText(); if( !hypert ) return; - if( strlen(reinterpret_cast<char *>(hypert->filename)) > 0 ){ - ::std::string const tmp = hstr2ksstr(hypert->bookmark); - ::std::string const tmp2 = hstr2ksstr(kstr2hstr( + if (hypert->filename[0] != '\0') { + ::std::string const tmp = hstr2ksstr(hypert->bookmark); + ::std::string const tmp2 = hstr2ksstr(kstr2hstr( #ifdef _WIN32 - (uchar *) urltowin((char *)hypert->filename).c_str()).c_str()); + (uchar *) urltowin((char *)hypert->filename).c_str()).c_str()); #else - reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hypert->filename)).c_str())).c_str()); + reinterpret_cast<uchar const *>(urltounix(reinterpret_cast<char *>(hypert->filename)).c_str())).c_str()); #endif padd("xlink:type", sXML_CDATA, "simple"); if (tmp.size() > 0 && strcmp(tmp.c_str(), "[HTML]")) { diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 208ff6852743..f2f2ae0d7549 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -60,7 +60,7 @@ SunVersion::SunVersion(const char * szVer): */ bool SunVersion::init(const char *szVersion) { - if ( ! szVersion || strlen(szVersion) == 0) + if (!szVersion || szVersion[0] == '\0') return false; //first get the major,minor,maintenance diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index ab3eea18e4e5..9c4ae2993075 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -349,7 +349,7 @@ int readoptions(char* filename, char*** pfargv) else { *poptbuff = EOS; - if (strlen(optbuff)>0) + if (optbuff[0] != '\0') { pfa[fargc + 1] = strdup(optbuff); fargc++; 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); diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index 707cc07d8539..c73fb88af58c 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -1516,7 +1516,7 @@ namespace rtl_OStringBuffer ( "test empty string", pstr != 0 && - strlen(pstr) == 0 + pstr[0] == '\0' ); } |