summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-15 20:24:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 07:57:45 +0200
commit3ee177a14d8b816ef5b62500aeb54524c289e045 (patch)
tree982b524a298c2b2f959f5c858c81be9b3420566a /sal
parent820f340f285932bbb8d6739177e9bb81c23c1a5d (diff)
loplugin:stringadd look through a couple more known-good methods
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/process/osl_process.cxx4
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx6
2 files changed, 4 insertions, 6 deletions
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 6ba730af5cd6..eaf34bd46d5b 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -73,8 +73,8 @@ static OUString getExecutablePath()
osl::Module::getUrlFromAddress(
reinterpret_cast<oslGenericFunction>(&getExecutablePath), dirPath);
dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
- dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
- dirPath += "Executable";
+ dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1) +
+ "Executable";
return dirPath;
}
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index acb8f9501f08..6b7ba799a415 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -57,8 +57,7 @@ static OUString getModulePath()
printUString(suDirPath, "modulePath:");
suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') );
- suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1);
- suDirPath += "bin";
+ suDirPath = suDirPath.copy( 0, suDirPath.lastIndexOf('/') + 1) + "bin";
return suDirPath;
}
@@ -232,8 +231,7 @@ public:
//we could get return value only after the process terminated
osl_joinProcess(hProcess);
- sal_Char pUUID2[33];
- pUUID2[32] = '\0';
+ sal_Char pUUID2[33] {};
sal_uInt64 nRead = 0;
osl_readFile( *pChildOutputRead, pUUID2, 32, &nRead );
printf("read buffer is %s, nRead is %" SAL_PRIdINT64 "\n", pUUID2, nRead );