diff options
author | gad <gad@FreeBSD.org> | 2001-07-22 00:03:21 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2001-07-22 00:03:21 +0000 |
commit | 352a508a9620f9dc3ff9678d9ec38872980977c6 (patch) | |
tree | 8e0cdbe1e8db8b5255d1519e39572c297477f897 /usr.sbin/lpr/lpd/recvjob.c | |
parent | a61f9aad89ebdaf2342707127d20abd90a16f48d (diff) | |
download | FreeBSD-src-352a508a9620f9dc3ff9678d9ec38872980977c6.zip FreeBSD-src-352a508a9620f9dc3ff9678d9ec38872980977c6.tar.gz |
Change a few read & write calls to use 'STDOUT_FILENO' instead of '1'.
Submitted by: David Hill <david@phobia.ms>
Reviewed by: freebsd-audit (a little)
MFC after: 1 week
Diffstat (limited to 'usr.sbin/lpr/lpd/recvjob.c')
-rw-r--r-- | usr.sbin/lpr/lpd/recvjob.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c index 4d291c2..d473680 100644 --- a/usr.sbin/lpr/lpd/recvjob.c +++ b/usr.sbin/lpr/lpd/recvjob.c @@ -69,7 +69,7 @@ static const char rcsid[] = #include "extern.h" #include "pathnames.h" -#define ack() (void) write(1, sp, 1); +#define ack() (void) write(STDOUT_FILENO, sp, 1); static char dfname[NAME_MAX]; /* data files */ static int minfree; /* keep at least minfree blocks available */ @@ -158,7 +158,7 @@ readjob(struct printer *pp) */ cp = line; do { - if ((size = read(1, cp, 1)) != 1) { + if ((size = read(STDOUT_FILENO, cp, 1)) != 1) { if (size < 0) { frecverr("%s: lost connection", pp->printer); @@ -201,7 +201,7 @@ readjob(struct printer *pp) frecverr("readjob: %s: illegal path name", tfname); if (!chksize(size)) { - (void) write(1, "\2", 1); + (void) write(STDOUT_FILENO, "\2", 1); continue; } if (!readfile(pp, tfname, size)) { @@ -226,7 +226,7 @@ readjob(struct printer *pp) if (*cp++ != ' ') break; if (!chksize(size)) { - (void) write(1, "\2", 1); + (void) write(STDOUT_FILENO, "\2", 1); continue; } (void) strncpy(dfname, cp, sizeof(dfname) - 1); @@ -273,7 +273,7 @@ readfile(struct printer *pp, char *file, int size) if (i + amt > size) amt = size - i; do { - j = read(1, cp, amt); + j = read(STDOUT_FILENO, cp, amt); if (j <= 0) { frecverr("%s: lost connection", pp->printer); /*NOTREACHED*/ @@ -308,7 +308,7 @@ noresponse(void) { char resp; - if (read(1, &resp, 1) != 1) { + if (read(STDOUT_FILENO, &resp, 1) != 1) { frecverr("lost connection in noresponse()"); /*NOTREACHED*/ } |