diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2001-07-26 11:02:39 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2001-07-26 11:02:39 +0000 |
commit | 9bfb9eedcddf3ab4e79532e863cf16c5ff381090 (patch) | |
tree | bd2ac2627dbeab7d3427432bb98d2c73085b61c1 /usr.bin/talk | |
parent | 505859f37d54f23b1ebc688851be182d4e1332c8 (diff) | |
download | FreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.zip FreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.tar.gz |
Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@phobia.ms>
Diffstat (limited to 'usr.bin/talk')
-rw-r--r-- | usr.bin/talk/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c index 40604e0..4a6fd9e 100644 --- a/usr.bin/talk/io.c +++ b/usr.bin/talk/io.c @@ -48,6 +48,7 @@ static const char rcsid[] = #include <errno.h> #include <string.h> #include <sys/filio.h> +#include <unistd.h> #include "talk.h" #define A_LONG_TIME 10000000 @@ -105,7 +106,7 @@ talk() */ int i; ioctl(0, FIONREAD, (struct sgttyb *) &nb); - nb = read(0, buf, nb); + nb = read(STDIN_FILENO, buf, nb); display(&my_win, buf, nb); /* might lose data here because sockt is non-blocking */ for (i = 0; i < nb; ++i) |