patch 9.0.0096: flag "new_value_alloced" is always true
Problem: Flag "new_value_alloced" is always true.
Solution: Remove "new_value_alloced". (closes #10792)
diff --git a/src/option.c b/src/option.c
index 8286713..2a5c914 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1716,8 +1716,6 @@
#endif
unsigned newlen;
int comma;
- int new_value_alloced; // new string option
- // was allocated
// When using ":set opt=val" for a global option
// with a local value the local value will be
@@ -1785,13 +1783,11 @@
s = newval;
newval = vim_strsave(s);
}
- new_value_alloced = TRUE;
}
else if (nextchar == '<') // set to global val
{
newval = vim_strsave(*(char_u **)get_varp_scope(
&(options[opt_idx]), OPT_GLOBAL));
- new_value_alloced = TRUE;
}
else
{
@@ -2060,7 +2056,6 @@
if (save_arg != NULL) // number for 'whichwrap'
arg = save_arg;
- new_value_alloced = TRUE;
}
/*
@@ -2109,8 +2104,7 @@
// 'syntax' or 'filetype' autocommands may be
// triggered that can cause havoc.
errmsg = did_set_string_option(
- opt_idx, (char_u **)varp,
- new_value_alloced, oldval, errbuf,
+ opt_idx, (char_u **)varp, oldval, errbuf,
opt_flags, &value_checked);
secure = secure_saved;