mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
option: Make all pointers in set_string_option constant
This commit is contained in:
parent
458a4d0444
commit
7900e38a8f
@ -2340,15 +2340,11 @@ static char *set_string_option(const int opt_idx, const char *const value,
|
||||
char *const oldval = *varp;
|
||||
*varp = s;
|
||||
|
||||
char *saved_oldval = NULL;
|
||||
if (!starting) {
|
||||
saved_oldval = xstrdup(oldval);
|
||||
}
|
||||
char *const saved_oldval = (starting ? NULL : xstrdup(oldval));
|
||||
|
||||
char *r = NULL;
|
||||
if ((r = (char *)did_set_string_option(opt_idx, (char_u **)varp, (int)true,
|
||||
(char_u *)oldval, NULL, opt_flags))
|
||||
== NULL) {
|
||||
char *const r = (char *)did_set_string_option(
|
||||
opt_idx, (char_u **)varp, (int)true, (char_u *)oldval, NULL, opt_flags);
|
||||
if (r == NULL) {
|
||||
did_set_option(opt_idx, opt_flags, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user