-/* $OpenBSD: krpc_subr.c,v 1.24 2014/11/18 02:37:31 tedu Exp $ */
+/* $OpenBSD: krpc_subr.c,v 1.25 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */
/*
*/
nam = m_get(M_WAIT, MT_SONAME);
sin = mtod(nam, struct sockaddr_in *);
- bcopy((caddr_t)sa, (caddr_t)sin, (nam->m_len = sa->sin_len));
+ bcopy(sa, sin, (nam->m_len = sa->sin_len));
/*
* Prepend RPC message header.
-/* $OpenBSD: nfs_bio.c,v 1.77 2014/11/14 23:01:44 tedu Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.78 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */
/*
if ((vp->v_flag & VROOT) && vp->v_type == VLNK) {
return (nfs_readlinkrpc(vp, uio, cred));
}
- baddr = (caddr_t)0;
+ baddr = NULL;
switch (vp->v_type) {
case VREG:
nfsstats.biocache_reads++;
-/* $OpenBSD: nfs_subs.c,v 1.119 2014/11/18 02:37:31 tedu Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.120 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
}
np->n_attrstamp = time_second;
if (vaper != NULL) {
- bcopy((caddr_t)vap, (caddr_t)vaper, sizeof(*vap));
+ bcopy(vap, vaper, sizeof(*vap));
if (np->n_flag & NCHG) {
if (np->n_flag & NACC)
vaper->va_atime = np->n_atim;
} else
np->n_size = vap->va_size;
}
- bcopy((caddr_t)vap, (caddr_t)vaper, sizeof(struct vattr));
+ bcopy(vap, vaper, sizeof(struct vattr));
if (np->n_flag & NCHG) {
if (np->n_flag & NACC)
vaper->va_atime = np->n_atim;
-/* $OpenBSD: nfs_vfsops.c,v 1.104 2014/12/16 18:30:04 tedu Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.105 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
/* Get mbuf for server sockaddr. */
m = m_get(M_WAIT, MT_SONAME);
- bcopy((caddr_t)ndmntp->ndm_args.addr, mtod(m, caddr_t),
+ bcopy(ndmntp->ndm_args.addr, mtod(m, caddr_t),
(m->m_len = ndmntp->ndm_args.addr->sa_len));
error = mountnfs(&ndmntp->ndm_args, mp, m, mntname,
if (nmp->nm_sotype == SOCK_DGRAM)
while (nfs_connect(nmp, NULL)) {
printf("nfs_args: retrying connect\n");
- (void) tsleep((caddr_t)&lbolt,
+ (void) tsleep(&lbolt,
PSOCK, "nfscon", 0);
}
}
if (error)
return (error);
if (args.version == 3) {
- error = copyin (data, (caddr_t)&args,
- sizeof (struct nfs_args3));
+ error = copyin(data, &args, sizeof(struct nfs_args3));
args.flags &= ~(NFSMNT_INTERNAL|NFSMNT_NOAC);
} else if (args.version == NFS_ARGSVERSION) {
- error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args));
+ error = copyin(data, &args, sizeof(struct nfs_args));
args.flags &= ~NFSMNT_NOAC; /* XXX - compatibility */
} else
return (EPROGMISMATCH);
}
if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX)
return (EINVAL);
- error = copyin((caddr_t)args.fh, (caddr_t)nfh, args.fhsize);
+ error = copyin(args.fh, nfh, args.fhsize);
if (error)
return (error);
error = copyinstr(args.hostname, hst, MNAMELEN-1, &len);
nmp->nm_acregmax = NFS_MAXATTRTIMO;
nmp->nm_acdirmin = NFS_MINATTRTIMO;
nmp->nm_acdirmax = NFS_MAXATTRTIMO;
- bcopy((caddr_t)argp->fh, (caddr_t)nmp->nm_fh, argp->fhsize);
+ bcopy(argp->fh, nmp->nm_fh, argp->fhsize);
strncpy(&mp->mnt_stat.f_fstypename[0], mp->mnt_vfc->vfc_name, MFSNAMELEN);
bcopy(pth, mp->mnt_stat.f_mntonname, MNAMELEN);
bcopy(hst, mp->mnt_stat.f_mntfromname, MNAMELEN);
-/* $OpenBSD: nfs_vnops.c,v 1.158 2014/12/16 18:30:04 tedu Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.159 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
commit == NFSV3WRITE_UNSTABLE)
committed = commit;
if ((nmp->nm_flag & NFSMNT_HASWRITEVERF) == 0) {
- bcopy((caddr_t)tl, (caddr_t)nmp->nm_verf,
+ bcopy(tl, nmp->nm_verf,
NFSX_V3WRITEVERF);
nmp->nm_flag |= NFSMNT_HASWRITEVERF;
- } else if (bcmp((caddr_t)tl,
- (caddr_t)nmp->nm_verf, NFSX_V3WRITEVERF)) {
+ } else if (bcmp(tl,
+ nmp->nm_verf, NFSX_V3WRITEVERF)) {
*must_commit = 1;
- bcopy((caddr_t)tl, (caddr_t)nmp->nm_verf,
+ bcopy(tl, nmp->nm_verf,
NFSX_V3WRITEVERF);
}
} else {
if (*npp) {
np = *npp;
np->n_fhp = &np->n_fh;
- bcopy((caddr_t)nfhp, (caddr_t)np->n_fhp, fhlen);
+ bcopy(nfhp, np->n_fhp, fhlen);
np->n_fhsize = fhlen;
newvp = NFSTOV(np);
} else if (NFS_CMPFH(dnp, nfhp, fhlen)) {
if (!error) {
nfsm_dissect(tl, u_int32_t *, NFSX_V3WRITEVERF);
- if (bcmp((caddr_t)nmp->nm_verf, (caddr_t)tl,
+ if (bcmp(nmp->nm_verf, tl,
NFSX_V3WRITEVERF)) {
- bcopy((caddr_t)tl, (caddr_t)nmp->nm_verf,
+ bcopy(tl, nmp->nm_verf,
NFSX_V3WRITEVERF);
error = NFSERR_STALEWRITEVERF;
}
if (waitfor != MNT_WAIT || passone)
continue;
bp->b_flags |= B_WANTED;
- error = tsleep((caddr_t)bp, slpflag | (PRIBIO + 1),
+ error = tsleep(bp, slpflag | (PRIBIO + 1),
"nfsfsync", slptimeo);
splx(s);
if (error) {
-/* $OpenBSD: nfsm_subs.h,v 1.43 2009/08/10 09:18:31 blambert Exp $ */
+/* $OpenBSD: nfsm_subs.h,v 1.44 2014/12/18 20:59:21 tedu Exp $ */
/* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */
/*
tl = nfsm_build(&info.nmi_mb, 2 * NFSX_UNSIGNED + NFSX_V3FH); \
*tl++ = nfs_true; \
*tl++ = txdr_unsigned(NFSX_V3FH); \
- bcopy((caddr_t)(f), (caddr_t)tl, NFSX_V3FH); \
+ bcopy((f), tl, NFSX_V3FH); \
}
#define nfsm_mtofh(d, v, v3, f) { \
} \
} \
nfsm_dissect(tl, u_int32_t *, NFSX_V3FH); \
- bcopy((caddr_t)tl, (caddr_t)(f), NFSX_V3FH); \
+ bcopy(tl, (f), NFSX_V3FH); \
if ((nfsd->nd_flag & ND_NFSV3) == 0) \
nfsm_adv(NFSX_V2FH - NFSX_V3FH); \
}