krnl386.exe16: Avoid hardcoding array lengths.

This commit is contained in:
Frédéric Delanoy 2011-11-21 19:19:48 +01:00 committed by Alexandre Julliard
parent 954e6eba7e
commit ebf4ae03b5
3 changed files with 5 additions and 5 deletions

View File

@ -336,7 +336,7 @@ static BYTE INT21_MapDrive( BYTE drive )
{
if (drive)
{
WCHAR drivespec[3] = {'A', ':', 0};
WCHAR drivespec[] = {'A', ':', 0};
UINT drivetype;
drivespec[0] += drive - 1;
@ -359,7 +359,7 @@ static BYTE INT21_MapDrive( BYTE drive )
*/
static void INT21_SetCurrentDrive( BYTE drive )
{
WCHAR drivespec[3] = {'A', ':', 0};
WCHAR drivespec[] = {'A', ':', 0};
drivespec[0] += drive;
@ -2451,7 +2451,7 @@ static void INT21_Ioctl_Block( CONTEXT *context )
{
BYTE *dataptr;
BYTE drive = INT21_MapDrive( BL_reg(context) );
WCHAR drivespec[4] = {'A', ':', '\\', 0};
WCHAR drivespec[] = {'A', ':', '\\', 0};
UINT drivetype;
drivespec[0] += drive;

View File

@ -82,7 +82,7 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f
*/
void WINAPI DOSVM_Int25Handler( CONTEXT *context )
{
WCHAR drivespec[4] = {'A', ':', '\\', 0};
WCHAR drivespec[] = {'A', ':', '\\', 0};
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
DWORD begin;
DWORD length;

View File

@ -71,7 +71,7 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL
*/
void WINAPI DOSVM_Int26Handler( CONTEXT *context )
{
WCHAR drivespec[4] = {'A', ':', '\\', 0};
WCHAR drivespec[] = {'A', ':', '\\', 0};
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
DWORD begin;
DWORD length;