=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: mountmgr.sys: Avoid hardcoding array lengths.
Alexandre Julliard
julliard at winehq.org
Tue Nov 22 13:06:42 CST 2011
Module: wine
Branch: master
Commit: 98535806080ada54f15092d1a836bb204952418d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=98535806080ada54f15092d1a836bb204952418d
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Mon Nov 21 19:19:49 2011 +0100
mountmgr.sys: Avoid hardcoding array lengths.
---
dlls/mountmgr.sys/device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 3f393e7..2d4116c 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -773,7 +773,7 @@ found:
if (!RegCreateKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
{
const WCHAR *type_name = drive_types[type];
- WCHAR name[3] = {'a',':',0};
+ WCHAR name[] = {'a',':',0};
name[0] += drive->drive;
if (!type_name[0] && type == DEVICE_HARDDISK) type_name = drive_types[DEVICE_FLOPPY];
@@ -826,7 +826,7 @@ NTSTATUS remove_dos_device( int letter, const char *udi )
/* clear the registry key too */
if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
{
- WCHAR name[3] = {'a',':',0};
+ WCHAR name[] = {'a',':',0};
name[0] += drive->drive;
RegDeleteValueW( hkey, name );
RegCloseKey( hkey );
More information about the wine-cvs
mailing list