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:
parent
73d0d743bd
commit
b6209b4ba4
|
@ -801,7 +801,7 @@ int main(int argc, char *argv[])
|
||||||
config = config_new();
|
config = config_new();
|
||||||
|
|
||||||
/* disable progressbar if the output is redirected */
|
/* disable progressbar if the output is redirected */
|
||||||
if(!isatty(1)) {
|
if(!isatty(fileno(stdout))) {
|
||||||
config->noprogressbar = 1;
|
config->noprogressbar = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue