=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: krnl386.exe16: Avoid hardcoding array lengths.
Alexandre Julliard
julliard at winehq.org
Tue Nov 22 13:06:42 CST 2011
Module: wine
Branch: master
Commit: ebf4ae03b5bcaf44a64dbb11415791bf1b738769
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ebf4ae03b5bcaf44a64dbb11415791bf1b738769
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Mon Nov 21 19:19:48 2011 +0100
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 2ec6345..f8e235a 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 5aa0b55..0513c8f 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 e475c8d..bb3d90b 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;
More information about the wine-cvs
mailing list