summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ktr.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/kern_ktr.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/kern_ktr.c')
-rw-r--r--sys/kern/kern_ktr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 004a19e..60bc9c8 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -341,9 +341,9 @@ DB_SHOW_COMMAND(ktr, db_ktr_all)
tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1);
tstate.first = -1;
db_ktr_verbose = 0;
- db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0;
- db_ktr_verbose |= (index(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */
- if (index(modif, 'a') != NULL) {
+ db_ktr_verbose |= (strchr(modif, 'v') != NULL) ? 2 : 0;
+ db_ktr_verbose |= (strchr(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */
+ if (strchr(modif, 'a') != NULL) {
db_disable_pager();
while (cncheckc() != -1)
if (db_mach_vtrace() == 0)
OpenPOWER on IntegriCloud