From ebf4ae03b5bcaf44a64dbb11415791bf1b738769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Mon, 21 Nov 2011 19:19:48 +0100 Subject: [PATCH] krnl386.exe16: Avoid hardcoding array lengths. --- dlls/krnl386.exe16/int21.c | 6 +++--- dlls/krnl386.exe16/int25.c | 2 +- dlls/krnl386.exe16/int26.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/krnl386.exe16/int21.c b/dlls/krnl386.exe16/int21.c index 2ec6345e02b..f8e235ad707 100644 --- a/dlls/krnl386.exe16/int21.c +++ b/dlls/krnl386.exe16/int21.c @@ -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; diff --git a/dlls/krnl386.exe16/int25.c b/dlls/krnl386.exe16/int25.c index 5aa0b55cd10..0513c8fdac1 100644 --- a/dlls/krnl386.exe16/int25.c +++ b/dlls/krnl386.exe16/int25.c @@ -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; diff --git a/dlls/krnl386.exe16/int26.c b/dlls/krnl386.exe16/int26.c index e475c8da9df..bb3d90bc662 100644 --- a/dlls/krnl386.exe16/int26.c +++ b/dlls/krnl386.exe16/int26.c @@ -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;