summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfs/nfsport.h2
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c4
-rw-r--r--sys/fs/smbfs/smbfs_vfsops.c4
-rw-r--r--sys/fs/smbfs/smbfs_vnops.c10
4 files changed, 10 insertions, 10 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 726d3b5..763e2bd 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -712,7 +712,7 @@ MALLOC_DECLARE(M_NEWNFSDROLLBACK);
/*
* Set this macro to index() or strchr(), whichever is supported.
*/
-#define STRCHR(s, c) index((s), (c))
+#define STRCHR(s, c) strchr((s), (c))
/*
* Set the n_time in the client write rpc, as required.
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);
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index ac0c5e7..eb2e7f9 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -234,10 +234,10 @@ smbfs_mount(struct mount *mp)
bzero(pc, MNAMELEN);
*pc++ = '/';
*pc++ = '/';
- pc=index(strncpy(pc, vcp->vc_username, pe - pc - 2), 0);
+ pc = strchr(strncpy(pc, vcp->vc_username, pe - pc - 2), 0);
if (pc < pe-1) {
*(pc++) = '@';
- pc = index(strncpy(pc, vcp->vc_srvname, pe - pc - 2), 0);
+ pc = strchr(strncpy(pc, vcp->vc_srvname, pe - pc - 2), 0);
if (pc < pe - 1) {
*(pc++) = '/';
strncpy(pc, ssp->ss_name, pe - pc - 2);
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c
index 830c249..a236ca7 100644
--- a/sys/fs/smbfs/smbfs_vnops.c
+++ b/sys/fs/smbfs/smbfs_vnops.c
@@ -1039,7 +1039,7 @@ smbfs_pathcheck(struct smbmount *smp, const char *name, int nmlen, int nameiop)
* Backslash characters, being a path delimiter, are prohibited
* within a path component even for LOOKUP operations.
*/
- if (index(name, '\\') != NULL)
+ if (strchr(name, '\\') != NULL)
return ENOENT;
if (nameiop == LOOKUP)
@@ -1051,20 +1051,20 @@ smbfs_pathcheck(struct smbmount *smp, const char *name, int nmlen, int nameiop)
*/
if (nmlen > 12)
return ENAMETOOLONG;
- cp = index(name, '.');
+ cp = strchr(name, '.');
if (cp == NULL)
return error;
if (cp == name || (cp - name) > 8)
return error;
- cp = index(cp + 1, '.');
+ cp = strchr(cp + 1, '.');
if (cp != NULL)
return error;
for (cp = name, i = 0; i < nmlen; i++, cp++)
- if (index(badchars83, *cp) != NULL)
+ if (strchr(badchars83, *cp) != NULL)
return error;
}
for (cp = name, i = 0; i < nmlen; i++, cp++)
- if (index(badchars, *cp) != NULL)
+ if (strchr(badchars, *cp) != NULL)
return error;
return 0;
}
OpenPOWER on IntegriCloud