mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
refactor: reduce scope of locals as per the style guide (#22211)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user