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/ddb | |
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/ddb')
-rw-r--r-- | sys/ddb/db_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index 39f2da7..171b3da 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -253,7 +253,7 @@ db_inputchar(c) db_putnchars(BACKUP, db_lc - db_lbuf_start); db_putnchars(BLANK, db_le - db_lbuf_start); db_putnchars(BACKUP, db_le - db_lbuf_start); - db_le = index(db_lbuf_start, '\0'); + db_le = strchr(db_lbuf_start, '\0'); if (db_le[-1] == '\r' || db_le[-1] == '\n') *--db_le = '\0'; db_lc = db_le; |