diff options
author | ed <ed@FreeBSD.org> | 2012-01-02 12:12:10 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-01-02 12:12:10 +0000 |
commit | ab210c8f2f4f0cd4839d93f66181fc7ad57ce8a9 (patch) | |
tree | c3375fb3aa9ccc6f33c26a511457552dfbab74a7 /sys/kern/kern_intr.c | |
parent | d9de01105e6c2f60ef0fb2a67c0f3d915cef8c61 (diff) | |
download | FreeBSD-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/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index b9ed881..ced3261 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -693,9 +693,9 @@ intr_event_describe_handler(struct intr_event *ie, void *cookie, * description at that point. If one is not found, find the * end of the name to use as the insertion point. */ - start = index(ih->ih_name, ':'); + start = strchr(ih->ih_name, ':'); if (start == NULL) - start = index(ih->ih_name, 0); + start = strchr(ih->ih_name, 0); /* * See if there is enough remaining room in the string for the @@ -1832,8 +1832,8 @@ DB_SHOW_COMMAND(intr, db_show_intr) struct intr_event *ie; int all, verbose; - verbose = index(modif, 'v') != NULL; - all = index(modif, 'a') != NULL; + verbose = strchr(modif, 'v') != NULL; + all = strchr(modif, 'a') != NULL; TAILQ_FOREACH(ie, &event_list, ie_list) { if (!all && TAILQ_EMPTY(&ie->ie_handlers)) continue; |