From 890a82fe2b717702edaaabf9aba2e90497a23927 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 16 Jun 2013 21:22:40 +0200 Subject: Listen: Fix test for tty's color capabilities. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was testing the address of the curses function has_color(), not its return value indicated by the following warning: utils.c: In function ‘initcolor’: utils.c:84:6: warning: the address of ‘has_colors’ will always evaluate as ‘true’ [-Waddress] Signed-off-by: Ralf Baechle --- listen/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'listen/utils.c') diff --git a/listen/utils.c b/listen/utils.c index 91b29c7..8f522e5 100644 --- a/listen/utils.c +++ b/listen/utils.c @@ -81,7 +81,7 @@ void lprintf(int dtype, char *fmt, ...) int initcolor(void) { - if (!has_colors) + if (!has_colors()) return 0; initscr(); /* Start ncurses */ start_color(); /* Initialize color support */ -- cgit v1.2.3