Commit 98535806 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

mountmgr.sys: Avoid hardcoding array lengths.

parent ebf4ae03
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment