Francois Gouget : testbot/TestLauncher: Rename countof() to ARRAY_SIZE().
Alexandre Julliard
julliard at winehq.org
Mon Mar 15 16:58:04 CDT 2021
Module: tools
Branch: master
Commit: 94c311cd482c7dac5bd961ad7e2c3ef0282dd856
URL: https://source.winehq.org/git/tools.git/?a=commit;h=94c311cd482c7dac5bd961ad7e2c3ef0282dd856
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Mar 15 19:15:26 2021 +0100
testbot/TestLauncher: Rename countof() to ARRAY_SIZE().
This matches the Wine code.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/src/TestLauncher/TestLauncher.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/src/TestLauncher/TestLauncher.c b/testbot/src/TestLauncher/TestLauncher.c
index 783dbab..02acde0 100644
--- a/testbot/src/TestLauncher/TestLauncher.c
+++ b/testbot/src/TestLauncher/TestLauncher.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <windows.h>
-#define countof(Array) (sizeof(Array) / sizeof(Array[0]))
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
static unsigned Failures = 0;
static unsigned Skips = 0;
@@ -324,7 +324,7 @@ int main(int argc, char *argv[])
}
else
{
- if (GetFullPathNameA(argv[Arg], countof(TestExeFullName), TestExeFullName, &TestExeFileName) == 0)
+ if (GetFullPathNameA(argv[Arg], ARRAY_SIZE(TestExeFullName), TestExeFullName, &TestExeFileName) == 0)
{
fprintf(stderr, "Can't determine full path of test executable %s, error %lu\n",
argv[Arg], GetLastError());
More information about the wine-cvs
mailing list