diff options
Diffstat (limited to 'src/nvim/tempfile.c')
-rw-r--r-- | src/nvim/tempfile.c | 2 |
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 |