desktop/source/deployment/misc/lockfile.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit d2b5e49c0b114fdf973e51b4387e232bd71f3838 Author: Julien Nabet <[email protected]> AuthorDate: Thu Apr 29 15:37:07 2021 +0200 Commit: Julien Nabet <[email protected]> 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 <[email protected]> Reviewed-by: Julien Nabet <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
