Michael Stefaniuc : advapi32: Use the available ARRAY_SIZE() macro.

Alexandre Julliard julliard at winehq.org
Thu Mar 29 19:13:30 CDT 2018


Module: wine
Branch: master
Commit: f9fda1e20fdf6700f190d34d50c80005a9aa6e45
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f9fda1e20fdf6700f190d34d50c80005a9aa6e45

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Thu Mar 29 17:14:15 2018 +0200

advapi32: Use the available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/advapi32/registry.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 44b4bed..087d47f 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -2373,7 +2373,7 @@ LSTATUS WINAPI RegSaveKeyW( HKEY hkey, LPCWSTR file, LPSECURITY_ATTRIBUTES sa )
     if (!(hkey = get_special_root_hkey( hkey, 0 ))) return ERROR_INVALID_HANDLE;
 
     err = GetLastError();
-    GetFullPathNameW( file, sizeof(buffer)/sizeof(WCHAR), buffer, &nameW );
+    GetFullPathNameW( file, ARRAY_SIZE( buffer ), buffer, &nameW );
 
     for (;;)
     {
@@ -2708,7 +2708,7 @@ LSTATUS WINAPI RegConnectRegistryW( LPCWSTR lpMachineName, HKEY hKey,
     }
     else {
         WCHAR compName[MAX_COMPUTERNAME_LENGTH + 1];
-        DWORD len = sizeof(compName) / sizeof(WCHAR);
+        DWORD len = ARRAY_SIZE( compName );
 
         /* MSDN says lpMachineName must start with \\ : not so */
         if( lpMachineName[0] == '\\' &&  lpMachineName[1] == '\\')




More information about the wine-cvs mailing list