lib/colors: remove redundant if statement

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2019-05-18 22:56:15 +01:00
parent 9abc8a42aa
commit cc7ffe129d
No known key found for this signature in database
GPG Key ID: 0D46FEF7E61DBB46
1 changed files with 1 additions and 3 deletions

View File

@ -662,11 +662,9 @@ static int colors_terminal_is_ready(void)
if (setupterm(NULL, STDOUT_FILENO, &ret) != 0 || ret != 1)
goto none;
ncolors = tigetnum("colors");
if (ncolors <= 2)
goto none;
}
#endif
if (ncolors != -1) {
if (1 < ncolors) {
DBG(CONF, ul_debug("terminal is ready (supports %d colors)", ncolors));
return 1;
}