diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-19 02:23:26 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-19 02:23:26 -0500 |
commit | 943b06329075865e4453a90f83afcbcfb2151965 (patch) | |
tree | 4b12072e943dcc4a5e542a7c8439cfe5f5460ba6 /src/nvim/ex_getln.c | |
parent | 5df8bf077bc69eab4e660dc09026878adcf54bb8 (diff) | |
parent | 478c99c128df506479b37d7ffbd1adee3134607f (diff) | |
download | rneovim-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/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index aed0484356..a19cb36d12 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3715,7 +3715,7 @@ ExpandFromContext ( * right function to do the expansion. */ ret = FAIL; - for (i = 0; i < (int)(sizeof(tab) / sizeof(struct expgen)); ++i) + for (i = 0; i < (int)ARRAY_SIZE(tab); ++i) if (xp->xp_context == tab[i].context) { if (tab[i].ic) { regmatch.rm_ic = TRUE; @@ -4155,7 +4155,7 @@ static char_u *get_history_arg(expand_T *xp, int idx) static char_u compl[2] = { NUL, NUL }; char *short_names = ":=@>?/"; int short_names_count = (int)STRLEN(short_names); - int history_name_count = sizeof(history_names) / sizeof(char *) - 1; + int history_name_count = ARRAY_SIZE(history_names) - 1; if (idx < short_names_count) { compl[0] = (char_u)short_names[idx]; |