[tools 1/3] testbot/TestLauncher: Rename countof() to ARRAY_SIZE().

Francois Gouget fgouget at codeweavers.com
Mon Mar 15 13:15:26 CDT 2021


This matches the Wine code.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 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 783dbaba5..02acde04f 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());
-- 
2.20.1




More information about the wine-devel mailing list