option: use char* for get_option_value() param

'name' param is casted to char_u* within get_option_value().
Most calls to get_option_value() cast arg to 'name' from char to char_u.
Remove these pointless type casts.
This commit is contained in:
Jan Edmund Lazo
2021-02-07 17:57:34 -05:00
parent b1df53e868
commit d34846af74
4 changed files with 8 additions and 8 deletions

View File

@@ -1848,7 +1848,7 @@ static char_u *ex_let_one(char_u *arg, typval_T *const tv,
s = tv_get_string_chk(tv); // != NULL if number or string.
}
if (s != NULL && op != NULL && *op != '=') {
opt_type = get_option_value(arg, &numval, (char_u **)&stringval,
opt_type = get_option_value((char *)arg, &numval, (char_u **)&stringval,
opt_flags);
if ((opt_type == 1 && *op == '.')
|| (opt_type == 0 && *op != '.')) {
@@ -4537,7 +4537,7 @@ int get_option_tv(const char **const arg, typval_T *const rettv,
c = *option_end;
*option_end = NUL;
opt_type = get_option_value((char_u *)(*arg), &numval,
opt_type = get_option_value(*arg, &numval,
rettv == NULL ? NULL : &stringval, opt_flags);
if (opt_type == -3) { // invalid name