Frédéric Delanoy : shell32: Avoid hardcoding array lengths.
Module: wine Branch: master Commit: 40179bedeeeeb7ecfcc75546802057792df9e1e5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=40179bedeeeeb7ecfcc7554680... Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Nov 22 23:00:39 2011 +0100 shell32: Avoid hardcoding array lengths. --- dlls/shell32/shelllink.c | 2 +- dlls/shell32/shfldr_unixfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index bb246e3..1fb3fbd 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -2115,7 +2115,7 @@ static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, LPCWSTR str) static BOOL ShellLink_GetVolumeInfo(LPCWSTR path, volume_info *volume) { const int label_sz = sizeof volume->label/sizeof volume->label[0]; - WCHAR drive[4] = { path[0], ':', '\\', 0 }; + WCHAR drive[] = { path[0], ':', '\\', 0 }; BOOL r; volume->type = GetDriveTypeW(drive); diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 2dc5920..9fe0786 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -1609,7 +1609,7 @@ static HRESULT WINAPI UnixFolder_IPersistFolder3_Initialize(IPersistFolder3* ifa if (current->mkid.cb) { if (_ILIsDrive(current)) { - WCHAR wszDrive[4] = { '?', ':', '\\', 0 }; + WCHAR wszDrive[] = { '?', ':', '\\', 0 }; wszDrive[0] = (WCHAR)*_ILGetTextPointer(current); if (!UNIXFS_get_unix_path(wszDrive, szBasePath)) return E_FAIL;
participants (1)
-
Alexandre Julliard