aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tempfile.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-12-13 11:11:49 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2014-12-18 15:41:37 -0300
commit8aeb2e37ee3361dd937acd0532d1a8ef2f7e54c6 (patch)
tree71e00cb43d01d1195e831c5ca72f6e8010947f1f /src/nvim/tempfile.c
parent3c857900fe9a7eff87aa4fbe6e7b80ba602ad2bd (diff)
downloadrneovim-8aeb2e37ee3361dd937acd0532d1a8ef2f7e54c6.tar.gz
rneovim-8aeb2e37ee3361dd937acd0532d1a8ef2f7e54c6.tar.bz2
rneovim-8aeb2e37ee3361dd937acd0532d1a8ef2f7e54c6.zip
Use ARRAY_SIZE where Coccinelle wasn't able to do it
Diffstat (limited to 'src/nvim/tempfile.c')
-rw-r--r--src/nvim/tempfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/tempfile.c b/src/nvim/tempfile.c
index 33d6f0f37d..f81aff53a1 100644
--- a/src/nvim/tempfile.c
+++ b/src/nvim/tempfile.c
@@ -30,7 +30,7 @@ static void vim_maketempdir(void)
// Try the entries in `TEMP_DIR_NAMES` to create the temp directory.
char_u template[TEMP_FILE_PATH_MAXLEN];
char_u path[TEMP_FILE_PATH_MAXLEN];
- for (size_t i = 0; i < sizeof(temp_dirs) / sizeof(char *); ++i) {
+ for (size_t i = 0; i < ARRAY_SIZE(temp_dirs); ++i) {
// Expand environment variables, leave room for "/nvimXXXXXX/999999999"
expand_env((char_u *)temp_dirs[i], template, TEMP_FILE_PATH_MAXLEN - 22);
if (!os_isdir(template)) { // directory doesn't exist