aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/encode.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-07 19:40:57 +0200
committerGitHub <noreply@github.com>2023-04-07 19:40:57 +0200
commit9408f2dcf7cade2631688300e9b58eed6bc5219a (patch)
tree152b8b6135f50619b1fb2a69719d71a180ea0792 /src/nvim/eval/encode.c
parent1d2a29f75ba7d094c8e7444c9b249a4a7211c93c (diff)
downloadrneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.tar.gz
rneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.tar.bz2
rneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.zip
refactor: remove redundant const char * casts
Diffstat (limited to 'src/nvim/eval/encode.c')
-rw-r--r--src/nvim/eval/encode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/encode.c b/src/nvim/eval/encode.c
index c2f1eae8af..b056a1784c 100644
--- a/src/nvim/eval/encode.c
+++ b/src/nvim/eval/encode.c
@@ -298,7 +298,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf, const s
#define TYPVAL_ENCODE_CONV_STRING(tv, buf, len) \
do { \
- const char *const buf_ = (const char *)(buf); \
+ const char *const buf_ = (buf); \
if ((buf) == NULL) { \
ga_concat(gap, "''"); \
} else { \
@@ -376,7 +376,7 @@ int encode_read_from_list(ListReaderState *const state, char *const buf, const s
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
do { \
- const char *const fun_ = (const char *)(fun); \
+ const char *const fun_ = (fun); \
if (fun_ == NULL) { \
internal_error("string(): NULL function name"); \
ga_concat(gap, "function(NULL"); \
@@ -712,7 +712,7 @@ static inline int convert_to_json_string(garray_T *const gap, const char *const
#undef TYPVAL_ENCODE_CONV_STRING
#define TYPVAL_ENCODE_CONV_STRING(tv, buf, len) \
do { \
- if (convert_to_json_string(gap, (const char *)(buf), (len)) != OK) { \
+ if (convert_to_json_string(gap, (buf), (len)) != OK) { \
return FAIL; \
} \
} while (0)