summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-13 10:09:21 +0200
committerNoel Grandin <noel@peralex.com>2015-06-15 13:34:14 +0200
commit4ea281a3ccb5bd21e1808d8cb127a91a1bb72691 (patch)
tree183a2ab634d770b7ef777323fa6851fc38e14011 /sal/osl
parent943f4b4ff1c524c514584c459b899ba3e9dfb71f (diff)
cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/w32/file_dirvol.cxx8
-rw-r--r--sal/osl/w32/profile.cxx13
2 files changed, 7 insertions, 14 deletions
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index a5d060509463..d882c3d9962f 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -600,9 +600,7 @@ static DWORD create_dir_with_callback(
// user specified callback function. On success
// the function returns ERROR_SUCCESS else a Win32 error code.
- BOOL bCreated = FALSE;
-
- bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( dir_path )), NULL );
+ BOOL bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( dir_path )), NULL );
if ( bCreated )
{
@@ -702,9 +700,7 @@ oslFileError osl_createDirectoryWithFlags(rtl_uString * strPath, sal_uInt32)
if ( osl_File_E_None == error )
{
- BOOL bCreated = FALSE;
-
- bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( strSysPath )), NULL );
+ BOOL bCreated = CreateDirectoryW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( strSysPath )), NULL );
if ( !bCreated )
{
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index eb9b779b14d0..0f51db39f032 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1925,19 +1925,16 @@ static sal_Bool osl_ProfileSwapProfileNames(osl_TProfileImpl* pProfile)
static rtl_uString* osl_ProfileGenerateExtension(rtl_uString* ustrFileName, rtl_uString* ustrExtension)
{
- rtl_uString* ustrNewFileName=0;
+ rtl_uString* ustrNewFileName = 0;
rtl_uString* ustrOldExtension = 0;
- sal_Unicode* pExtensionBuf = 0;
- sal_Unicode* pFileNameBuf = 0;
- sal_Int32 nIndex = -1;
- pFileNameBuf = rtl_uString_getStr(ustrFileName);
+ sal_Unicode* pFileNameBuf = rtl_uString_getStr(ustrFileName);
- rtl_uString_newFromAscii(&ustrOldExtension,".");
+ rtl_uString_newFromAscii(&ustrOldExtension, ".");
- pExtensionBuf = rtl_uString_getStr(ustrOldExtension);
+ sal_Unicode* pExtensionBuf = rtl_uString_getStr(ustrOldExtension);
- nIndex = rtl_ustr_lastIndexOfChar(pFileNameBuf,*pExtensionBuf);
+ sal_Int32 nIndex = rtl_ustr_lastIndexOfChar(pFileNameBuf, *pExtensionBuf);
rtl_uString_newReplaceStrAt(&ustrNewFileName,
ustrFileName,