diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-04-25 04:18:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-24 20:18:43 -0600 |
commit | 0648100fed65cbe8efe774ae997ab841cae01872 (patch) | |
tree | 4b2b5a41f58ddf442a69726f6a315c393317714b /src/nvim/eval/encode.c | |
parent | 7813fa2f8cc3885788abc5c5dceea6638d8416e6 (diff) | |
download | rneovim-0648100fed65cbe8efe774ae997ab841cae01872.tar.gz rneovim-0648100fed65cbe8efe774ae997ab841cae01872.tar.bz2 rneovim-0648100fed65cbe8efe774ae997ab841cae01872.zip |
refactor: convert macros to all-caps (#17895)
Closes https://github.com/neovim/neovim/issues/6297
Diffstat (limited to 'src/nvim/eval/encode.c')
-rw-r--r-- | src/nvim/eval/encode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c index 6f4357421b..b04e3c04d6 100644 --- a/src/nvim/eval/encode.c +++ b/src/nvim/eval/encode.c @@ -29,8 +29,6 @@ #include "nvim/message.h" #include "nvim/vim.h" // For _() -#define utf_char2len(b) ((size_t)utf_char2len(b)) - const char *const encode_bool_var_names[] = { [kBoolVarTrue] = "true", [kBoolVarFalse] = "false", @@ -653,7 +651,7 @@ static inline int convert_to_json_string(garray_T *const gap, const char *const ga_grow(gap, (int)str_len); for (size_t i = 0; i < utf_len;) { const int ch = utf_ptr2char((char_u *)utf_buf + i); - const size_t shift = (ch == 0? 1: utf_char2len(ch)); + const size_t shift = (ch == 0 ? 1 : ((size_t)utf_char2len(ch))); assert(shift > 0); // Is false on invalid unicode, but this should already be handled. assert(ch == 0 || shift == ((size_t)utf_ptr2len((char_u *)utf_buf + i))); |