Patch 8.2.0579

10 views
Skip to first unread message

Bram Moolenaar

unread,
Apr 14, 2020, 2:57:13 PM4/14/20
to vim...@googlegroups.com

Patch 8.2.0579
Problem: Coverity warns for unused value.
Solution: Change order and use "else if".
Files: src/os_unix.c


*** ../vim-8.2.0578/src/os_unix.c 2020-04-05 21:42:09.285006966 +0200
--- src/os_unix.c 2020-04-14 20:53:36.890507922 +0200
***************
*** 5491,5503 ****
term = getenv("TERM");
#endif
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
! // back to "xterm".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
{
- if (t_colors > 16)
- term = "xterm-color";
if (t_colors >= 256)
term = "xterm-256color";
else
term = "xterm";
}
--- 5491,5504 ----
term = getenv("TERM");
#endif
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
! // back to "xterm" or "xterm-color".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
{
if (t_colors >= 256)
+ // TODO: should we check this name is supported?
term = "xterm-256color";
+ else if (t_colors > 16)
+ term = "xterm-color";
else
term = "xterm";
}
*** ../vim-8.2.0578/src/version.c 2020-04-14 20:15:45.288566185 +0200
--- src/version.c 2020-04-14 20:54:24.046355620 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 579,
/**/

--
Bad programs can be written in any language.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages