aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-12-19 02:23:26 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-12-19 02:23:26 -0500
commit943b06329075865e4453a90f83afcbcfb2151965 (patch)
tree4b12072e943dcc4a5e542a7c8439cfe5f5460ba6 /src/nvim/eval.c
parent5df8bf077bc69eab4e660dc09026878adcf54bb8 (diff)
parent478c99c128df506479b37d7ffbd1adee3134607f (diff)
downloadrneovim-943b06329075865e4453a90f83afcbcfb2151965.tar.gz
rneovim-943b06329075865e4453a90f83afcbcfb2151965.tar.bz2
rneovim-943b06329075865e4453a90f83afcbcfb2151965.zip
Merge pull request #1663 from philix/array_size
Define and use the ARRAY_SIZE macro
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index c79a467889..d058e6ccae 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -6652,7 +6652,7 @@ char_u *get_function_name(expand_T *xp, int idx)
if (name != NULL)
return name;
}
- if (++intidx < (int)(sizeof(functions) / sizeof(struct fst))) {
+ if (++intidx < (int)ARRAY_SIZE(functions)) {
STRCPY(IObuff, functions[intidx].f_name);
STRCAT(IObuff, "(");
if (functions[intidx].f_max_argc == 0)
@@ -6695,7 +6695,7 @@ find_internal_func (
)
{
int first = 0;
- int last = (int)(sizeof(functions) / sizeof(struct fst)) - 1;
+ int last = (int)ARRAY_SIZE(functions) - 1;
/*
* Find the function name in the table. Binary search.