summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
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/fs/nwfs
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/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index c20159f..697f9d1 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -206,10 +206,10 @@ static int nwfs_mount(struct mount *mp)
pe = pc+sizeof(mp->mnt_stat.f_mntfromname);
bzero(pc, MNAMELEN);
*(pc++) = '/';
- pc = index(strncpy(pc, conn->li.server, pe-pc-2),0);
+ pc = strchr(strncpy(pc, conn->li.server, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = ':';
- pc=index(strncpy(pc, conn->li.user, pe-pc-2),0);
+ pc = strchr(strncpy(pc, conn->li.user, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = '/';
strncpy(pc, nmp->m.mounted_vol, pe-pc-2);
OpenPOWER on IntegriCloud