aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 3deda0a8c9..6787ca8080 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -3943,7 +3943,7 @@ get_syn_options (
if (strchr(first_letters, *arg) == NULL)
break;
- for (fidx = sizeof(flagtab) / sizeof(struct flag); --fidx >= 0; ) {
+ for (fidx = ARRAY_SIZE(flagtab); --fidx >= 0; ) {
p = flagtab[fidx].name;
int i;
for (i = 0, len = 0; p[i] != NUL; i += 2, ++len)
@@ -6295,7 +6295,7 @@ do_highlight (
attr = 0;
off = 0;
while (arg[off] != NUL) {
- for (i = sizeof(hl_attr_table) / sizeof(int); --i >= 0; ) {
+ for (i = ARRAY_SIZE(hl_attr_table); --i >= 0; ) {
len = (int)STRLEN(hl_name_table[i]);
if (STRNICMP(arg + off, hl_name_table[i], len) == 0) {
attr |= hl_attr_table[i];
@@ -6416,7 +6416,7 @@ do_highlight (
/* reduce calls to STRICMP a bit, it can be slow */
off = TOUPPER_ASC(*arg);
- for (i = (sizeof(color_names) / sizeof(char *)); --i >= 0; )
+ for (i = ARRAY_SIZE(color_names); --i >= 0; )
if (off == color_names[i][0]
&& STRICMP(arg + 1, color_names[i] + 1) == 0)
break;