Michael Stefaniuc : cmd/tests: Use the available ARRAY_SIZE() macro.
Module: wine Branch: master Commit: ea6cc7245c91d5d1f07bec1866752814d8cdaa81 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ea6cc7245c91d5d1f07bec186... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue May 29 01:05:31 2018 +0200 cmd/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/cmd/tests/batch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c index 7196609..0c94d7e 100644 --- a/programs/cmd/tests/batch.c +++ b/programs/cmd/tests/batch.c @@ -25,7 +25,7 @@ static char workdir[MAX_PATH]; static DWORD workdir_len; static char drive[2]; -static const DWORD drive_len = sizeof(drive)/sizeof(drive[0]); +static const DWORD drive_len = ARRAY_SIZE(drive); static char path[MAX_PATH]; static DWORD path_len; static char shortpath[MAX_PATH]; @@ -469,8 +469,7 @@ START_TEST(batch) } else { path_len = 1; /* \ */ } - shortpath_len = GetShortPathNameA(path, shortpath, - sizeof(shortpath)/sizeof(shortpath[0])); + shortpath_len = GetShortPathNameA(path, shortpath, ARRAY_SIZE(shortpath)); argc = winetest_get_mainargs(&argv); if(argc > 2)
participants (1)
-
Alexandre Julliard