diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-07 17:57:34 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-07 17:57:37 -0500 |
commit | d34846af7455b8411476700920cdb64f121bae69 (patch) | |
tree | 16f255fcf66a50ceea661e08cbea7ce965c46e7c /src/nvim/option.c | |
parent | b1df53e86884445d56a171eede5cf76138f2a4d3 (diff) | |
download | rneovim-d34846af7455b8411476700920cdb64f121bae69.tar.gz rneovim-d34846af7455b8411476700920cdb64f121bae69.tar.bz2 rneovim-d34846af7455b8411476700920cdb64f121bae69.zip |
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.
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 6af52645df..ac25c86b5f 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4531,7 +4531,7 @@ bool is_tty_option(const char *name) #define TCO_BUFFER_SIZE 8 /// @param name TUI-related option /// @param[out,allocated] value option string value -bool get_tty_option(char *name, char **value) +bool get_tty_option(const char *name, char **value) { if (strequal(name, "t_Co")) { if (value) { @@ -4611,17 +4611,17 @@ static int findoption(const char *const arg) /// hidden String option: -2. /// unknown option: -3. int get_option_value( - char_u *name, + const char *name, long *numval, char_u **stringval, ///< NULL when only checking existence int opt_flags ) { - if (get_tty_option((char *)name, (char **)stringval)) { + if (get_tty_option(name, (char **)stringval)) { return 0; } - int opt_idx = findoption((const char *)name); + int opt_idx = findoption(name); if (opt_idx < 0) { // Unknown option. return -3; } |