cmd: Use the ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Michael Stefaniuc 2018-10-29 20:10:41 +01:00 committed by Alexandre Julliard
parent f051aa6774
commit a46f311f3f
1 changed files with 2 additions and 2 deletions

View File

@ -2419,9 +2419,9 @@ int wmain (int argc, WCHAR *argvW[])
OSVERSIONINFOW osv;
char osver[50];
if (!GetEnvironmentVariableW(comspecW, comspec, sizeof(comspec)/sizeof(WCHAR)))
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);
SetEnvironmentVariableW(comspecW, comspec);
}