patch 8.2.2922: computing array length is done in various ways
Problem: Computing array length is done in various ways.
Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes #8305)
diff --git a/src/arabic.c b/src/arabic.c
index efc6aa6..f64dab2 100644
--- a/src/arabic.c
+++ b/src/arabic.c
@@ -163,8 +163,6 @@
#define a_BYTE_ORDER_MARK 0xfeff
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
/*
* Find the struct achar pointer to the given Arabic char.
* Returns NULL if not found.
@@ -175,7 +173,7 @@
int h, m, l;
// using binary search to find c
- h = ARRAY_SIZE(achars);
+ h = ARRAY_LENGTH(achars);
l = 0;
while (l < h)
{