diff options
author | Sami Kerola | 2016-05-07 00:27:17 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-01 21:51:47 +0200 |
commit | 59f3d6ae123851da79e77b4c85f842aac413ccf8 (patch) | |
tree | 5306713e09e3233e592341b8e424fe36bdea63f1 /term-utils | |
parent | write: get rid of function prototypes (diff) | |
download | kernel-qcow2-util-linux-59f3d6ae123851da79e77b4c85f842aac413ccf8.tar.gz kernel-qcow2-util-linux-59f3d6ae123851da79e77b4c85f842aac413ccf8.tar.xz kernel-qcow2-util-linux-59f3d6ae123851da79e77b4c85f842aac413ccf8.zip |
write: remove pointless fileno(3) calls
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/write.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/term-utils/write.c b/term-utils/write.c index b8bd08eca..03af66050 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -312,12 +312,12 @@ int main(int argc, char **argv) } /* check that sender has write enabled */ - if (isatty(fileno(stdin))) - myttyfd = fileno(stdin); - else if (isatty(fileno(stdout))) - myttyfd = fileno(stdout); - else if (isatty(fileno(stderr))) - myttyfd = fileno(stderr); + if (isatty(STDIN_FILENO)) + myttyfd = STDIN_FILENO; + else if (isatty(STDOUT_FILENO)) + myttyfd = STDOUT_FILENO; + else if (isatty(STDERR_FILENO)) + myttyfd = STDERR_FILENO; else myttyfd = -1; |