From d0850586df3dbf738542dac55b6329d6de1ad73b Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 16 Apr 2018 11:36:06 +0300 Subject: option: Fix PVS/V547: var is always NULL at that point --- src/nvim/option.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index 35830b9ca5..f50d735e50 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -6219,14 +6219,15 @@ void ExpandOldSetting(int *num_file, char_u ***file) } 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); var = NameBuff; - } else if (var == NULL) + } else { var = (char_u *)""; + } - /* A backslash is required before some characters. This is the reverse of - * what happens in do_set(). */ + // A backslash is required before some characters. This is the reverse of + // what happens in do_set(). char_u *buf = vim_strsave_escaped(var, escape_chars); #ifdef BACKSLASH_IN_FILENAME -- cgit