diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-02-11 14:14:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 14:14:24 +0100 |
commit | 27177e581902967dcf4f2f426464da1b636ca420 (patch) | |
tree | ba52f1e21ad2c4d4a00dc4af9fa602ae27bb86df /src/nvim/optionstr.c | |
parent | 224a3c77caa6fea8299eb3be326fa6ff7300a21b (diff) | |
download | rneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.gz rneovim-27177e581902967dcf4f2f426464da1b636ca420.tar.bz2 rneovim-27177e581902967dcf4f2f426464da1b636ca420.zip |
refactor: reduce scope of locals as per the style guide (#22211)
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 7efbeadb2f..5f8514b1a6 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -330,7 +330,6 @@ void set_string_option_direct(const char *name, int opt_idx, const char *val, in int set_sid) { char *s; - char **varp; int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; int idx = opt_idx; @@ -353,7 +352,7 @@ void set_string_option_direct(const char *name, int opt_idx, const char *val, in s = xstrdup(val); { - varp = (char **)get_varp_scope(opt, both ? OPT_LOCAL : opt_flags); + char **varp = (char **)get_varp_scope(opt, both ? OPT_LOCAL : opt_flags); if ((opt_flags & OPT_FREE) && (opt->flags & P_ALLOCED)) { free_string_option(*varp); } |