[PATCH] cmd: Use the ARRAY_SIZE() macro
Michael Stefaniuc
mstefani at winehq.org
Mon Oct 29 14:10:41 CDT 2018
Signed-off-by: Michael Stefaniuc <mstefani at 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 5ef4a2bf34..1c99661b44 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);
}
--
2.14.5
More information about the wine-devel
mailing list