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 /libexec/rexecd | |
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 'libexec/rexecd')
-rw-r--r-- | libexec/rexecd/rexecd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index f820b90..57bb14c 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -237,7 +237,7 @@ doit(f, fromp) syslog(LOG_INFO, "login from %s as %s", remote, user); - (void) write(2, "\0", 1); + (void) write(STDERR_FILENO, "\0", 1); if (port) { (void) pipe(pv); pid = fork(); @@ -314,7 +314,7 @@ error(fmt, a1, a2, a3) buf[0] = 1; (void) snprintf(buf+1, sizeof(buf) - 1, fmt, a1, a2, a3); - (void) write(2, buf, strlen(buf)); + (void) write(STDERR_FILENO, buf, strlen(buf)); } void @@ -326,7 +326,7 @@ getstr(buf, cnt, err) char c; do { - if (read(0, &c, 1) != 1) + if (read(STDIN_FILENO, &c, 1) != 1) exit(1); *buf++ = c; if (--cnt == 0) { |