diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-06-20 13:09:06 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@proton.me> | 2023-06-20 20:38:15 +0600 |
commit | 3681b7bb3bb942462c4261ab477e8912ae35b1a9 (patch) | |
tree | eed274e4907c0fa6d9f8546830e60fa2859ceeb1 /src/nvim/optionstr.c | |
parent | c07dceba335c56c9a356395ad0d1e5a14d416752 (diff) | |
download | rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.tar.gz rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.tar.bz2 rneovim-3681b7bb3bb942462c4261ab477e8912ae35b1a9.zip |
refactor(option): use `void *` for pointer to option value
Option related code uses `char *` for pointer to option value, which is not the best way of representing a type-agnostic pointer.
Solution: Make pointers to option value use `void *` instead.
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 53d58017f9..a0ffecbad0 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -352,7 +352,7 @@ void set_string_option_direct(const char *name, int opt_idx, const char *val, in return; } - assert((void *)opt->var != (void *)&p_shada); + assert(opt->var != &p_shada); s = xstrdup(val); { @@ -2067,7 +2067,7 @@ static const char *did_set_string_option_for(buf_T *buf, win_T *win, int opt_idx bool value_changed = false; optset_T args = { - .os_varp = (char *)varp, + .os_varp = varp, .os_idx = opt_idx, .os_flags = opt_flags, .os_oldval.string = oldval, |