diff options
author | K.Takata <kentkt@csc.jp> | 2021-06-02 13:28:16 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-02 13:28:16 +0200 |
commit | eeec2548785b2dd245a31ab25d7bde0f88ea1a6d (patch) | |
tree | 533236c436888fd7a072c4d94a75279158f9c8a5 /src/time.c | |
parent | b54abeeafb074248597878a874fed9a66b114c06 (diff) | |
download | vim-git-eeec2548785b2dd245a31ab25d7bde0f88ea1a6d.tar.gz |
patch 8.2.2922: computing array length is done in various waysv8.2.2922
Problem: Computing array length is done in various ways.
Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes #8305)
Diffstat (limited to 'src/time.c')
-rw-r--r-- | src/time.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/time.c b/src/time.c index a28708f9f..6d4ad5d51 100644 --- a/src/time.c +++ b/src/time.c @@ -276,8 +276,7 @@ f_strftime(typval_T *argvars, typval_T *rettv) wp = enc_to_utf16(p, NULL); if (wp != NULL) - (void)wcsftime(result_buf, sizeof(result_buf) / sizeof(WCHAR), - wp, curtime); + (void)wcsftime(result_buf, ARRAY_LENGTH(result_buf), wp, curtime); else result_buf[0] = NUL; rettv->vval.v_string = utf16_to_enc(result_buf, NULL); |