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

Alexandre Julliard julliard at winehq.org
Wed Feb 28 15:39:33 CST 2018


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed Feb 28 01:11:31 2018 +0100

scrrun: 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/scrrun/filesystem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 0527531..aa16600 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -1001,7 +1001,7 @@ static HRESULT WINAPI drive_get_VolumeName(IDrive *iface, BSTR *name)
         return E_POINTER;
 
     *name = NULL;
-    ret = GetVolumeInformationW(This->root, nameW, sizeof(nameW)/sizeof(WCHAR), NULL, NULL, NULL, NULL, 0);
+    ret = GetVolumeInformationW(This->root, nameW, ARRAY_SIZE(nameW), NULL, NULL, NULL, NULL, 0);
     if (ret)
         *name = SysAllocString(nameW);
     return ret ? S_OK : E_FAIL;
@@ -1026,7 +1026,7 @@ static HRESULT WINAPI drive_get_FileSystem(IDrive *iface, BSTR *fs)
         return E_POINTER;
 
     *fs = NULL;
-    ret = GetVolumeInformationW(This->root, NULL, 0, NULL, NULL, NULL, nameW, sizeof(nameW)/sizeof(WCHAR));
+    ret = GetVolumeInformationW(This->root, NULL, 0, NULL, NULL, NULL, nameW, ARRAY_SIZE(nameW));
     if (ret)
         *fs = SysAllocString(nameW);
     return ret ? S_OK : E_FAIL;




More information about the wine-cvs mailing list