[PATCH] kernel32: Use the ARRAY_SIZE() macro
Michael Stefaniuc
mstefani at winehq.org
Wed Nov 14 13:46:01 CST 2018
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/kernel32/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 53b1b2d933..abf33df2a2 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2553,7 +2553,7 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
if (!GetEnvironmentVariableW( comspecW, comspec, ARRAY_SIZE( comspec )))
{
- GetSystemDirectoryW( comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR) );
+ GetSystemDirectoryW( comspec, ARRAY_SIZE( comspec ) - ARRAY_SIZE( cmdW ));
strcatW( comspec, cmdW );
}
if (!(newcmdline = HeapAlloc( GetProcessHeap(), 0,
--
2.14.5
More information about the wine-devel
mailing list