summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2000-11-14 21:44:47 +0000
committergad <gad@FreeBSD.org>2000-11-14 21:44:47 +0000
commit4614ebebe63809cfba3eaa9957a1cadb1a7f022a (patch)
tree7c30f602700a8a2f5e72afc3c1dbf10f4525c29a /usr.sbin
parent703de2fc19207523c49cb65133235d37aa74568b (diff)
downloadFreeBSD-src-4614ebebe63809cfba3eaa9957a1cadb1a7f022a.zip
FreeBSD-src-4614ebebe63809cfba3eaa9957a1cadb1a7f022a.tar.gz
Change 'count' to a more descriptive 'jobcount', and fix the stupid
comments which claim this counter is counting "files", which it is not.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/lpr/lpd/printjob.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index f9fba20..bf9d918 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));
OpenPOWER on IntegriCloud