summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
Diffstat (limited to 'automation')
-rw-r--r--automation/source/testtool/registry_win.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/automation/source/testtool/registry_win.cxx b/automation/source/testtool/registry_win.cxx
index 264a68aae257..5b204b41286a 100644
--- a/automation/source/testtool/registry_win.cxx
+++ b/automation/source/testtool/registry_win.cxx
@@ -46,6 +46,7 @@
#include "registry_win.hxx"
#include <osl/thread.h>
+#include <sal/macros.h>
String ReadRegistry( String aKey, String aValueName )
@@ -70,8 +71,8 @@ String ReadRegistry( String aKey, String aValueName )
&hRegKey ) == ERROR_SUCCESS )
{
LONG lRet;
- sal_Unicode PathW[_MAX_PATH];
- DWORD lSize = sizeof(PathW) / sizeof( sal_Unicode );
+ sal_Unicode PathW[_MAX_PATH ];
+ DWORD lSize = SAL_N_ELEMENTS(PathW);
DWORD Type = REG_SZ;
lRet = RegQueryValueExW(hRegKey, reinterpret_cast<LPCWSTR>(aValueName.GetBuffer()), NULL, &Type, (LPBYTE)PathW, &lSize);