patch 8.2.0579: Coverity warns for unused value
Problem: Coverity warns for unused value.
Solution: Change order and use "else if".
diff --git a/src/os_unix.c b/src/os_unix.c
index 397342c..c6d386b 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5491,13 +5491,14 @@
term = getenv("TERM");
#endif
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
- // back to "xterm".
+ // back to "xterm" or "xterm-color".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
{
- if (t_colors > 16)
- term = "xterm-color";
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";
}
diff --git a/src/version.c b/src/version.c
index 2f64d5a..58827f2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 579,
+/**/
578,
/**/
577,