[PATCH] cmd/tests: Use the available ARRAY_SIZE() macro
Michael Stefaniuc
mstefani at winehq.org
Mon May 28 18:05:31 CDT 2018
Signed-off-by: Michael Stefaniuc <mstefani at 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 71966090e9..0c94d7e339 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)
--
2.14.3
More information about the wine-devel
mailing list