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.sbin/nghook | |
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.sbin/nghook')
-rw-r--r-- | usr.sbin/nghook/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/nghook/main.c b/usr.sbin/nghook/main.c index c0ef43d..c5fd205 100644 --- a/usr.sbin/nghook/main.c +++ b/usr.sbin/nghook/main.c @@ -156,7 +156,7 @@ main(int ac, char *av[]) /* Write packet to stdout */ if (asciiFlag) WriteAscii((u_char *) buf, rl); - else if ((wl = write(1, buf, rl)) != rl) { + else if ((wl = write(STDOUT_FILENO, buf, rl)) != rl) { if (wl < 0) { err(EX_OSERR, "write(stdout)"); } else { @@ -221,7 +221,7 @@ WriteAscii(u_char *buf, int len) sizeof(sbuf) - strlen(sbuf), " "); snprintf(sbuf + strlen(sbuf), sizeof(sbuf) - strlen(sbuf), "\n"); - (void) write(1, sbuf, strlen(sbuf)); + (void) write(STDOUT_FILENO, sbuf, strlen(sbuf)); } ch = '\n'; write(1, &ch, 1); |