diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-21 09:24:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-21 09:24:09 +0800 |
commit | e86d2734a93e159d44df8132dee6b994e5922d18 (patch) | |
tree | e8a3015ebc88d880f9e749a7e69fbcf0d8793037 /src/nvim/testing.c | |
parent | 1c16d0994d08f1a6c396bc46833d0bfdade29422 (diff) | |
download | rneovim-e86d2734a93e159d44df8132dee6b994e5922d18.tar.gz rneovim-e86d2734a93e159d44df8132dee6b994e5922d18.tar.bz2 rneovim-e86d2734a93e159d44df8132dee6b994e5922d18.zip |
refactor: use uint8_t for blobs and ga_append() (#21916)
A blob is used as a sequence of bytes and usually accessed individually,
not as as a NUL-terminuated string, so uint8_t should be better.
Not sure about ga_append(), but using uint8_t leads to fewer casts.
Diffstat (limited to 'src/nvim/testing.c')
-rw-r--r-- | src/nvim/testing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/testing.c b/src/nvim/testing.c index d168e67957..edf92c78ac 100644 --- a/src/nvim/testing.c +++ b/src/nvim/testing.c @@ -98,7 +98,7 @@ static void ga_concat_esc(garray_T *gap, const char *p, int clen) vim_snprintf(buf, NUMBUFLEN, "\\x%02x", *p); ga_concat(gap, buf); } else { - ga_append(gap, *p); + ga_append(gap, (uint8_t)(*p)); } break; } |