1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-03-01 01:41:52 -05:00

Use fileno() in isatty() call

This was our only use of the function that had a hardcoded file
descriptor.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-01-12 07:47:29 -06:00
parent 73d0d743bd
commit b6209b4ba4

View File

@ -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;
}