diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-29 23:33:40 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-29 23:33:40 +0000 |
commit | a65580ffe4015aa3ff33845af072cc6d8449328c (patch) | |
tree | 440f567bdbe079c50caba2104223eaf9e8911e3b /sys/nfs | |
parent | 0181b3616d9227302ce4911ebb960a51c11b31ae (diff) |
Initialize various uninitialized variables. Found by jsg@ via Clang.
Feedback from miod@ and kettenis@.
ok beck@
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_serv.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index f5773a15fc7..059b1a1852d 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.89 2009/10/19 22:24:18 jsg Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.90 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -439,6 +439,8 @@ nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, info.nmi_dpos = nfsd->nd_dpos; info.nmi_v3 = (nfsd->nd_flag & ND_NFSV3); + memset(&uio, 0, sizeof(uio)); + fhp = &nfh.fh_generic; nfsm_srvmtofh(fhp); error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam, &rdonly); diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 0b9fada31f5..5f0fbf3d0b6 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.127 2009/12/15 15:53:48 beck Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.128 2010/03/29 23:33:39 krw Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -1927,7 +1927,7 @@ nfs_readdir(void *v) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct uio *uio = ap->a_uio; - int tresid, error; + int tresid, error = 0; struct vattr vattr; u_long *cookies = NULL; int ncookies = 0, cnt; |