Mercurial > vim
comparison src/os_unix.c @ 20047:bdb712c7ecf4 v8.2.0579
patch 8.2.0579: Coverity warns for unused value
Commit: https://github.com/vim/vim/commit/4d5d0dfe9438bd5f2daa41ebbe6ac9a76d165af0
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 14 20:56:31 2020 +0200
patch 8.2.0579: Coverity warns for unused value
Problem: Coverity warns for unused value.
Solution: Change order and use "else if".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Apr 2020 21:00:04 +0200 |
parents | 851b9af01aad |
children | 0ab9d7469ce7 |
comparison
equal
deleted
inserted
replaced
20046:23656ac9113c | 20047:bdb712c7ecf4 |
---|---|
5489 if (term_is_gui(T_NAME)) | 5489 if (term_is_gui(T_NAME)) |
5490 // In the GUI 'term' is not what we want, use $TERM. | 5490 // In the GUI 'term' is not what we want, use $TERM. |
5491 term = getenv("TERM"); | 5491 term = getenv("TERM"); |
5492 #endif | 5492 #endif |
5493 // Use 'term' or $TERM if it starts with "xterm", otherwise fall | 5493 // Use 'term' or $TERM if it starts with "xterm", otherwise fall |
5494 // back to "xterm". | 5494 // back to "xterm" or "xterm-color". |
5495 if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0) | 5495 if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0) |
5496 { | 5496 { |
5497 if (t_colors > 16) | 5497 if (t_colors >= 256) |
5498 // TODO: should we check this name is supported? | |
5499 term = "xterm-256color"; | |
5500 else if (t_colors > 16) | |
5498 term = "xterm-color"; | 5501 term = "xterm-color"; |
5499 if (t_colors >= 256) | |
5500 term = "xterm-256color"; | |
5501 else | 5502 else |
5502 term = "xterm"; | 5503 term = "xterm"; |
5503 } | 5504 } |
5504 set_child_environment( | 5505 set_child_environment( |
5505 (long)options->jo_term_rows, | 5506 (long)options->jo_term_rows, |