option: Fix PVS/V547: var is always NULL at that point

This commit is contained in:
ZyX
2018-04-16 11:36:06 +03:00
parent 6a5b9de546
commit d0850586df

View File

@@ -6219,14 +6219,15 @@ void ExpandOldSetting(int *num_file, char_u ***file)
} }
if (expand_option_idx >= 0) { if (expand_option_idx >= 0) {
/* put string of option value in NameBuff */ // Put string of option value in NameBuff.
option_value2string(&options[expand_option_idx], expand_option_flags); option_value2string(&options[expand_option_idx], expand_option_flags);
var = NameBuff; var = NameBuff;
} else if (var == NULL) } else {
var = (char_u *)""; var = (char_u *)"";
}
/* A backslash is required before some characters. This is the reverse of // A backslash is required before some characters. This is the reverse of
* what happens in do_set(). */ // what happens in do_set().
char_u *buf = vim_strsave_escaped(var, escape_chars); char_u *buf = vim_strsave_escaped(var, escape_chars);
#ifdef BACKSLASH_IN_FILENAME #ifdef BACKSLASH_IN_FILENAME