Michael Stefaniuc : cmd: Use the ARRAY_SIZE() macro.
Module: wine Branch: master Commit: a46f311f3fc23623f9141eac2f230b9b7adf333a URL: https://source.winehq.org/git/wine.git/?a=commit;h=a46f311f3fc23623f9141eac2... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Mon Oct 29 20:10:41 2018 +0100 cmd: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/cmd/wcmdmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 5ef4a2b..1c99661 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -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); }
participants (1)
-
Alexandre Julliard