summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-01-12 14:47:29 +0100
committerDan McGee <dan@archlinux.org>2012-01-12 14:47:32 +0100
commitb6209b4ba495dd4379806b72735dac78b8843c03 (patch)
tree3026ca75171b24a9e26580d8bb14ea73bbc936cb
parent73d0d743bda5367fcab2453bbe21c15e481150c2 (diff)
downloadpacman-b6209b4ba495dd4379806b72735dac78b8843c03.tar.gz
pacman-b6209b4ba495dd4379806b72735dac78b8843c03.tar.xz
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>
-rw-r--r--src/pacman/pacman.c2
1 files changed, 1 insertions, 1 deletions
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;
}