From a46f311f3fc23623f9141eac2f230b9b7adf333a Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 29 Oct 2018 20:10:41 +0100 Subject: [PATCH] cmd: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- 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 5ef4a2bf348..1c99661b44a 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); }