[Libreoffice-commits] core.git: desktop/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 29 16:46:18 UTC 2021
desktop/source/deployment/misc/lockfile.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit d2b5e49c0b114fdf973e51b4387e232bd71f3838
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Apr 29 15:37:07 2021 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Thu Apr 29 18:45:37 2021 +0200
Can use stack instead of heap (desktop/lockfile)
Change-Id: I31f53436e31ca0dfe7de34bb252f104d4a1b34f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114885
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Jenkins
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index 50da67e9706e..206da8286d76 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -52,9 +52,9 @@ static OString impl_getHostname()
hostname by using the netbios name
*/
DWORD sz = MAX_COMPUTERNAME_LENGTH + 1;
- auto szHost = std::make_unique<char[]>(sz);
- if (GetComputerNameA(szHost.get(), &sz))
- aHost = OString(szHost.get());
+ TCHAR szHost[MAX_COMPUTERNAME_LENGTH + 1];
+ if (GetComputerNameA(szHost, &sz))
+ aHost = OString(szHost);
else
aHost = OString("UNKNOWN");
#else
More information about the Libreoffice-commits
mailing list