diff options
author | imp <imp@FreeBSD.org> | 1997-07-23 20:53:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-07-23 20:53:41 +0000 |
commit | 181a3aef05fad102fcb087cc47240b3a5d52298e (patch) | |
tree | c48d19a7b4478e844002bb59020ae6d5c314f81f /usr.sbin/lpr/runqueue | |
parent | 31c730f3a6d3460c60a94601d51508874b1db14a (diff) | |
download | FreeBSD-src-181a3aef05fad102fcb087cc47240b3a5d52298e.zip FreeBSD-src-181a3aef05fad102fcb087cc47240b3a5d52298e.tar.gz |
index -> strchr and rindex -> strrchr to reduce the number of gratuitous
diffes with NetBSD/OpenBSD. These changes seem to predate the NetBSD/OpenBSD
split, so it is hard to give proper credit for them.
Obtained from: OpenBSD.
Diffstat (limited to 'usr.sbin/lpr/runqueue')
-rw-r--r-- | usr.sbin/lpr/runqueue/printjob.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/lpr/runqueue/printjob.c b/usr.sbin/lpr/runqueue/printjob.c index 44a839d..84240d2 100644 --- a/usr.sbin/lpr/runqueue/printjob.c +++ b/usr.sbin/lpr/runqueue/printjob.c @@ -653,7 +653,7 @@ print(format, file) printer, format); return(ERROR); } - if ((av[0] = rindex(prog, '/')) != NULL) + if ((av[0] = strrchr(prog, '/')) != NULL) av[0]++; else av[0] = prog; @@ -882,7 +882,7 @@ sendfile(type, file, format) syslog(LOG_ERR, "mkstemp: %m"); return(ERROR); } - if ((av[0] = rindex(IF, '/')) == NULL) + if ((av[0] = strrchr(IF, '/')) == NULL) av[0] = IF; else av[0]++; @@ -1193,7 +1193,7 @@ sendmail(user, bombed) closelog(); for (i = 3, dtablesize = getdtablesize(); i < dtablesize; i++) (void) close(i); - if ((cp = rindex(_PATH_SENDMAIL, '/')) != NULL) + if ((cp = strrchr(_PATH_SENDMAIL, '/')) != NULL) cp++; else cp = _PATH_SENDMAIL; @@ -1385,7 +1385,7 @@ openpr() char *cp; if (!remote && *LP) { - if (cp = index(LP, '@')) + if (cp = strchr(LP, '@')) opennet(cp); else opentty(); @@ -1416,7 +1416,7 @@ openpr() for (i = 3, dtablesize = getdtablesize(); i < dtablesize; i++) (void) close(i); - if ((cp = rindex(OF, '/')) == NULL) + if ((cp = strrchr(OF, '/')) == NULL) cp = OF; else cp++; |