Merge pull request #4294 from justinmk/coverity

coverity
This commit is contained in:
Justin M. Keyes 2016-02-19 02:38:42 -05:00
commit 12938b82fb
2 changed files with 7 additions and 4 deletions

View File

@ -1741,12 +1741,15 @@ int buflist_findpat(
int toggledollar; int toggledollar;
if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) { if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) {
if (*pattern == '%') if (*pattern == '%') {
match = curbuf->b_fnum; match = curbuf->b_fnum;
else } else {
match = curwin->w_alt_fnum; match = curwin->w_alt_fnum;
if (diffmode && !diff_mode_buf(buflist_findnr(match))) }
buf_T *found_buf = buflist_findnr(match);
if (diffmode && !(found_buf && diff_mode_buf(found_buf))) {
match = -1; match = -1;
}
} }
/* /*
* Try four ways of matching a listed buffer: * Try four ways of matching a listed buffer:

View File

@ -2077,7 +2077,7 @@ static void didset_options2(void)
(void)highlight_changed(); (void)highlight_changed();
// Parse default for 'clipboard'. // Parse default for 'clipboard'.
opt_strings_flags(p_cb, p_cb_values, &cb_flags, true); (void)opt_strings_flags(p_cb, p_cb_values, &cb_flags, true);
// Parse default for 'fillchars'. // Parse default for 'fillchars'.
(void)set_chars_option(&p_fcs); (void)set_chars_option(&p_fcs);