mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
mountmgr.sys: Avoid hardcoding array lengths.
This commit is contained in:
parent
ebf4ae03b5
commit
9853580608
1 changed files with 2 additions and 2 deletions
|
@ -773,7 +773,7 @@ found:
|
||||||
if (!RegCreateKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
|
if (!RegCreateKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
|
||||||
{
|
{
|
||||||
const WCHAR *type_name = drive_types[type];
|
const WCHAR *type_name = drive_types[type];
|
||||||
WCHAR name[3] = {'a',':',0};
|
WCHAR name[] = {'a',':',0};
|
||||||
|
|
||||||
name[0] += drive->drive;
|
name[0] += drive->drive;
|
||||||
if (!type_name[0] && type == DEVICE_HARDDISK) type_name = drive_types[DEVICE_FLOPPY];
|
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 */
|
/* clear the registry key too */
|
||||||
if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
|
if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, drives_keyW, &hkey ))
|
||||||
{
|
{
|
||||||
WCHAR name[3] = {'a',':',0};
|
WCHAR name[] = {'a',':',0};
|
||||||
name[0] += drive->drive;
|
name[0] += drive->drive;
|
||||||
RegDeleteValueW( hkey, name );
|
RegDeleteValueW( hkey, name );
|
||||||
RegCloseKey( hkey );
|
RegCloseKey( hkey );
|
||||||
|
|
Loading…
Reference in a new issue