not just a return value, nfs_lookitup treats it specially when *npp
is not NULL.
- nfs_lookitup - When we match the file handle to the directory
filehandle (lookup on '.'), initialize np so that we don't return
stack garbage to the caller. The function shouldn't ever be
called with '.' at this moment, but that's no reason to not do the
right thing in case future callers use it that way.
blambert@ thib@ ok
-/* $OpenBSD: nfs_vnops.c,v 1.94 2008/07/06 16:54:48 thib Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.95 2008/07/23 11:53:07 art Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
u_int32_t *tl;
int32_t t1;
struct vnode *newvp = (struct vnode *)0;
- struct nfsnode *np;
+ struct nfsnode *np = NULL;
char *cp2;
caddr_t dpos;
int error = 0, wccflag = NFSV3_WCCRATTR, gotvp = 0;
} else if (NFS_CMPFH(dnp, nfhp, fhlen)) {
VREF(dvp);
newvp = dvp;
+ np = dnp;
} else {
error = nfs_nget(dvp->v_mount, nfhp, fhlen, &np);
if (error) {