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.
This commit is contained in:
Jan Edmund Lazo
2021-02-07 10:21:06 -05:00
parent f1fdeaf667
commit 7484c7de9a
5 changed files with 13 additions and 12 deletions

View File

@@ -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;