aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-07 10:21:06 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-07 17:27:59 -0500
commit7484c7de9a5a1556cd19b1f8bf471282979bd328 (patch)
treed4fe51c7fe77658bbe23936075923179818d2b12 /src/nvim/eval.c
parentf1fdeaf667033751378f6e1e29a6039e15de503e (diff)
downloadrneovim-7484c7de9a5a1556cd19b1f8bf471282979bd328.tar.gz
rneovim-7484c7de9a5a1556cd19b1f8bf471282979bd328.tar.bz2
rneovim-7484c7de9a5a1556cd19b1f8bf471282979bd328.zip
eval: use char* for set_internal_string_var()
"name" param was cast to (const char *). All calls to set_internal_string_var() cast from (char *) to (char_u *). Remove these useless casts.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index f1df1ecc68..a7675efa2a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -455,14 +455,15 @@ void eval_clear(void)
* Set an internal variable to a string value. Creates the variable if it does
* not already exist.
*/
-void set_internal_string_var(char_u *name, char_u *value)
+void set_internal_string_var(const char *name, char_u *value)
+ FUNC_ATTR_NONNULL_ARG(1)
{
- const typval_T tv = {
+ typval_T tv = {
.v_type = VAR_STRING,
.vval.v_string = value,
};
- set_var((const char *)name, STRLEN(name), (typval_T *)&tv, true);
+ set_var(name, strlen(name), &tv, true);
}
static lval_T *redir_lval = NULL;