diff options
author | Garance A Drosehn <gad@FreeBSD.org> | 2000-11-14 21:44:47 +0000 |
---|---|---|
committer | Garance A Drosehn <gad@FreeBSD.org> | 2000-11-14 21:44:47 +0000 |
commit | a480d5f20e75e27718bceb1c7c1dd45b45a13a5d (patch) | |
tree | 342d6ce322dab5137b5f2ddaaf80648cad94f50a /usr.sbin/lpr/lpd/printjob.c | |
parent | a4803ea103d45b3654fa54bd2724b8293594c41c (diff) |
Change 'count' to a more descriptive 'jobcount', and fix the stupid
comments which claim this counter is counting "files", which it is not.
Notes
Notes:
svn path=/head/; revision=68733
Diffstat (limited to 'usr.sbin/lpr/lpd/printjob.c')
-rw-r--r-- | usr.sbin/lpr/lpd/printjob.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index f9fba209bfff..bf9d918a083a 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -152,10 +152,10 @@ printjob(pp) register struct jobqueue *q, **qp; struct jobqueue **queue; register int i, nitems; - off_t pidoff; - int errcnt, count = 0; - int tempfd; + off_t pidoff; + int errcnt, jobcount, tempfd; + jobcount = 0; init(pp); /* set up capabilities */ (void) write(1, "", 1); /* ack that daemon is started */ (void) close(2); /* set up log file */ @@ -275,8 +275,8 @@ again: break; } } - if (i == OK) /* file ok and printed */ - count++; + if (i == OK) /* all files of this job printed */ + jobcount++; else if (i == REPRINT && ++errcnt < 5) { /* try reprinting the job */ syslog(LOG_INFO, "restarting %s", pp->printer); @@ -319,7 +319,7 @@ again: } if (nitems == 0) { /* no more work to do */ done: - if (count > 0) { /* Files actually printed */ + if (jobcount > 0) { /* jobs actually printed */ if (!pp->no_formfeed && !pp->tof) (void) write(ofd, pp->form_feed, strlen(pp->form_feed)); |