From 5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 19 May 2008 09:48:17 +0000 Subject: - use STD*_FILENO some more. No object-code changes --- util-linux/script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util-linux') diff --git a/util-linux/script.c b/util-linux/script.c index c1883328f..e70294e6c 100644 --- a/util-linux/script.c +++ b/util-linux/script.c @@ -124,7 +124,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv) goto restore; } if (count > 0) { - full_write(1, buf, count); + full_write(STDOUT_FILENO, buf, count); full_write(outfd, buf, count); if (opt & 4) { /* -f */ fsync(outfd); @@ -132,7 +132,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv) } } if (pfd[1].revents) { - count = safe_read(0, buf, sizeof(buf)); + count = safe_read(STDIN_FILENO, buf, sizeof(buf)); if (count <= 0) { /* err/eof from stdin: don't read stdin anymore */ pfd[1].revents = 0; @@ -152,7 +152,7 @@ int script_main(int argc ATTRIBUTE_UNUSED, char **argv) loop = 999; /* pty is in O_NONBLOCK mode, we exit as soon as buffer is empty */ while (--loop && (count = safe_read(pty, buf, sizeof(buf))) > 0) { - full_write(1, buf, count); + full_write(STDOUT_FILENO, buf, count); full_write(outfd, buf, count); } restore: -- cgit v1.2.3