From b6209b4ba495dd4379806b72735dac78b8843c03 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 12 Jan 2012 07:47:29 -0600 Subject: Use fileno() in isatty() call This was our only use of the function that had a hardcoded file descriptor. Signed-off-by: Dan McGee --- src/pacman/pacman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 326664dd..bce73d21 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -801,7 +801,7 @@ int main(int argc, char *argv[]) config = config_new(); /* disable progressbar if the output is redirected */ - if(!isatty(1)) { + if(!isatty(fileno(stdout))) { config->noprogressbar = 1; } -- cgit v1.2.3-70-g09d2