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 /bin | |
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 'bin')
-rw-r--r-- | bin/sh/memalloc.c | 2 | ||||
-rw-r--r-- | bin/sh/miscbltin.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c index c106775..26b4b2d 100644 --- a/bin/sh/memalloc.c +++ b/bin/sh/memalloc.c @@ -161,7 +161,7 @@ stunalloc(p) pointer p; { if (p == NULL) { /*DEBUG */ - write(2, "stunalloc\n", 10); + write(STDERR_FILENO, "stunalloc\n", 10); abort(); } stacknleft += stacknxt - (char *)p; diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 46d3950..5c5d154 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -171,7 +171,7 @@ readcmd(argc, argv) backslash = 0; STARTSTACKSTR(p); for (;;) { - if (read(0, &c, 1) != 1) { + if (read(STDIN_FILENO, &c, 1) != 1) { status = 1; break; } @@ -194,7 +194,7 @@ readcmd(argc, argv) } startword = 0; if (backslash && c == '\\') { - if (read(0, &c, 1) != 1) { + if (read(STDIN_FILENO, &c, 1) != 1) { status = 1; break; } |