aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/tty_inq.c
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2012-01-02 12:12:10 +0000
committerEd Schouten <ed@FreeBSD.org>2012-01-02 12:12:10 +0000
commitdc15eac046a11d0a831eedf97459900227c50fb8 (patch)
treec3375fb3aa9ccc6f33c26a511457552dfbab74a7 /sys/kern/tty_inq.c
parent762ad1d61427188c189f601d7315496ca15e9e4f (diff)
downloadsrc-dc15eac046a11d0a831eedf97459900227c50fb8.tar.gz
src-dc15eac046a11d0a831eedf97459900227c50fb8.zip
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.
Notes
Notes: svn path=/head/; revision=229272
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 0c39a293dedd..97017ac75a41 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);
}