summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_inq.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-01-02 12:12:10 +0000
committered <ed@FreeBSD.org>2012-01-02 12:12:10 +0000
commitab210c8f2f4f0cd4839d93f66181fc7ad57ce8a9 (patch)
treec3375fb3aa9ccc6f33c26a511457552dfbab74a7 /sys/kern/tty_inq.c
parentd9de01105e6c2f60ef0fb2a67c0f3d915cef8c61 (diff)
downloadFreeBSD-src-ab210c8f2f4f0cd4839d93f66181fc7ad57ce8a9.zip
FreeBSD-src-ab210c8f2f4f0cd4839d93f66181fc7ad57ce8a9.tar.gz
Use strchr() and strrchr().
It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel.
Diffstat (limited to 'sys/kern/tty_inq.c')
-rw-r--r--sys/kern/tty_inq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_inq.c b/sys/kern/tty_inq.c
index 0c39a29..97017ac 100644
--- a/sys/kern/tty_inq.c
+++ b/sys/kern/tty_inq.c
@@ -355,7 +355,7 @@ ttyinq_findchar(struct ttyinq *ti, const char *breakc, size_t maxlen,
return (0);
while (boff < bend) {
- if (index(breakc, tib->tib_data[boff]) && !GETBIT(tib, boff)) {
+ if (strchr(breakc, tib->tib_data[boff]) && !GETBIT(tib, boff)) {
*lastc = tib->tib_data[boff];
return (boff - ti->ti_begin + 1);
}
OpenPOWER on IntegriCloud