summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-11-14 23:01:44 +0000
committertedu <tedu@openbsd.org>2014-11-14 23:01:44 +0000
commit851e11fab09ba0dbdc06cd5b339df2912c0d3892 (patch)
tree75feb57050a4740f8112eac093e488081d723497
parentfrom natano: (diff)
downloadwireguard-openbsd-851e11fab09ba0dbdc06cd5b339df2912c0d3892.tar.xz
wireguard-openbsd-851e11fab09ba0dbdc06cd5b339df2912c0d3892.zip
bzero -> memset
-rw-r--r--sys/nfs/krpc_subr.c4
-rw-r--r--sys/nfs/nfs_bio.c4
-rw-r--r--sys/nfs/nfs_boot.c10
-rw-r--r--sys/nfs/nfs_serv.c14
-rw-r--r--sys/nfs/nfs_socket.c4
-rw-r--r--sys/nfs/nfs_subs.c4
-rw-r--r--sys/nfs/nfs_vfsops.c4
7 files changed, 22 insertions, 22 deletions
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c
index 31714070965..e33615e843e 100644
--- a/sys/nfs/krpc_subr.c
+++ b/sys/nfs/krpc_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: krpc_subr.c,v 1.22 2013/11/11 09:15:35 mpi Exp $ */
+/* $OpenBSD: krpc_subr.c,v 1.23 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */
/*
@@ -305,7 +305,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
mhead->m_next = *data;
call = mtod(mhead, struct rpc_call *);
mhead->m_len = sizeof(*call);
- bzero((caddr_t)call, sizeof(*call));
+ memset(call, 0, sizeof(*call));
/* rpc_call part */
xid = krpc_get_xid();
call->rp_xid = txdr_unsigned(xid);
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index c3415e5799a..9e7791b1b84 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_bio.c,v 1.76 2014/07/08 17:19:26 deraadt Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.77 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */
/*
@@ -592,7 +592,7 @@ nfs_doio(struct buf *bp, struct proc *p)
+ diff);
if (len > 0) {
len = min(len, uiop->uio_resid);
- bzero((char *)bp->b_data + diff, len);
+ memset((char *)bp->b_data + diff, 0, len);
bp->b_validend = diff + len;
} else
bp->b_validend = diff;
diff --git a/sys/nfs/nfs_boot.c b/sys/nfs/nfs_boot.c
index a539a210bc8..d54709a9493 100644
--- a/sys/nfs/nfs_boot.c
+++ b/sys/nfs/nfs_boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_boot.c,v 1.34 2014/09/14 14:17:26 jsg Exp $ */
+/* $OpenBSD: nfs_boot.c,v 1.35 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */
/*
@@ -178,7 +178,7 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp)
* Do enough of ifconfig(8) so that the chosen interface
* can talk to the servers. (just set the address)
*/
- bzero(&ifra, sizeof(ifra));
+ memset(&ifra, 0, sizeof(ifra));
bcopy(ifp->if_xname, ifra.ifra_name, sizeof(ifra.ifra_name));
sin = (struct sockaddr_in *)&ifra.ifra_addr;
@@ -204,7 +204,7 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp)
* The server address returned by the WHOAMI call
* is used for all subsequent bootparam RPCs.
*/
- bzero((caddr_t)&bp_sin, sizeof(bp_sin));
+ memset(&bp_sin, 0, sizeof(bp_sin));
bp_sin.sin_len = sizeof(bp_sin);
bp_sin.sin_family = AF_INET;
bp_sin.sin_addr.s_addr = ifatoia(ifa)->ia_broadaddr.sin_addr.s_addr;
@@ -240,7 +240,7 @@ nfs_boot_getfh(struct sockaddr_in *bpsin, char *key,
args = &ndmntp->ndm_args;
/* Initialize mount args. */
- bzero((caddr_t) args, sizeof(*args));
+ memset(args, 0, sizeof(*args));
args->addr = (struct sockaddr *)&ndmntp->ndm_saddr;
args->addrlen = args->addr->sa_len;
args->sotype = SOCK_DGRAM;
@@ -480,7 +480,7 @@ bp_getfile(struct sockaddr_in *bpsin, char *key, struct sockaddr_in *md_sin,
/* setup server socket address */
sin = md_sin;
- bzero((caddr_t)sin, sizeof(*sin));
+ memset(sin, 0, sizeof(*sin));
sin->sin_len = sizeof(*sin);
sin->sin_family = AF_INET;
sin->sin_addr = inaddr;
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 570fcb5453e..e33f5749622 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.98 2014/11/03 21:28:35 tedu Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.99 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -386,7 +386,7 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
vrele(nd.ni_startdir);
pool_put(&namei_pool, nd.ni_cnd.cn_pnbuf);
vp = nd.ni_vp;
- bzero((caddr_t)fhp, sizeof(nfh));
+ memset(fhp, 0, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fhp->fh_fid);
if (!error)
@@ -1046,7 +1046,7 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
}
}
if (!error) {
- bzero((caddr_t)fhp, sizeof(nfh));
+ memset(fhp, 0, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fhp->fh_fid);
if (!error)
@@ -1209,7 +1209,7 @@ nfsrv_mknod(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
out:
vp = nd.ni_vp;
if (!error) {
- bzero((caddr_t)fhp, sizeof(nfh));
+ memset(fhp, 0, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fhp->fh_fid);
if (!error)
@@ -1715,7 +1715,7 @@ nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
nd.ni_cnd.cn_cred = cred;
error = vfs_lookup(&nd);
if (!error) {
- bzero((caddr_t)fhp, sizeof(nfh));
+ memset(fhp, 0, sizeof(nfh));
fhp->fh_fsid = nd.ni_vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(nd.ni_vp, &fhp->fh_fid);
if (!error)
@@ -1842,7 +1842,7 @@ nfsrv_mkdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &va);
if (!error) {
vp = nd.ni_vp;
- bzero((caddr_t)fhp, sizeof(nfh));
+ memset(fhp, 0, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fhp->fh_fid);
if (!error)
@@ -2380,7 +2380,7 @@ again:
*/
if (VFS_VGET(vp->v_mount, dp->d_fileno, &nvp))
goto invalid;
- bzero((caddr_t)nfhp, NFSX_V3FH);
+ memset(nfhp, 0, NFSX_V3FH);
nfhp->fh_fsid =
nvp->v_mount->mnt_stat.f_fsid;
if (VFS_VPTOFH(nvp, &nfhp->fh_fid)) {
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index e5ba9a1d1d7..c17ac3d9e29 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.105 2014/04/18 13:35:31 kettenis Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.106 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1503,7 +1503,7 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header)
}
nfsm_adv(nfsm_rndup(len));
nfsm_dissect(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
- bzero((caddr_t)&nd->nd_cr, sizeof (struct ucred));
+ memset(&nd->nd_cr, 0, sizeof (struct ucred));
nd->nd_cr.cr_ref = 1;
nd->nd_cr.cr_uid = fxdr_unsigned(uid_t, *tl++);
nd->nd_cr.cr_gid = fxdr_unsigned(gid_t, *tl++);
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index b084e20e8c2..3e772c50c35 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.117 2014/09/14 14:17:26 jsg Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.118 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -734,7 +734,7 @@ nfsm_uiotombuf(struct mbuf **mp, struct uio *uiop, size_t len)
mb->m_next = mb2;
mb = mb2;
}
- bzero(mb_offset(mb), pad);
+ memset(mb_offset(mb), 0, pad);
mb->m_len += pad;
}
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 24eee5b4127..84ff1381d05 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.101 2014/09/08 06:24:13 jsg Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.102 2014/11/14 23:01:44 tedu Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -596,7 +596,7 @@ nfs_mount(struct mount *mp, const char *path, void *data,
error = copyinstr(args.hostname, hst, MNAMELEN-1, &len);
if (error)
return (error);
- bzero(&hst[len], MNAMELEN - len);
+ memset(&hst[len], 0, MNAMELEN - len);
/* sockargs() call must be after above copyin() calls */
error = sockargs(&nam, args.addr, args.addrlen, MT_SONAME);
if (error)