COVERITY CID 1113: Don't use NULL for VOP_READDIR
This commit is contained in:
parent
c904bed6a0
commit
08172fe2d0
|
@ -6,7 +6,7 @@ mkdir
|
||||||
rmdir
|
rmdir
|
||||||
symlink
|
symlink
|
||||||
*/
|
*/
|
||||||
/* $NetBSD: coda_vnops.c,v 1.47 2006/03/01 12:38:12 yamt Exp $ */
|
/* $NetBSD: coda_vnops.c,v 1.48 2006/04/12 01:05:14 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
@ -54,7 +54,7 @@ symlink
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.47 2006/03/01 12:38:12 yamt Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.48 2006/04/12 01:05:14 christos Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -1677,14 +1677,14 @@ coda_readdir(void *v)
|
||||||
printf("coda_readdir: Internally Opening %p\n", vp);
|
printf("coda_readdir: Internally Opening %p\n", vp);
|
||||||
#endif
|
#endif
|
||||||
if (error) return(error);
|
if (error) return(error);
|
||||||
}
|
} else
|
||||||
|
vp = cp->c_ovp;
|
||||||
|
|
||||||
/* Have UFS handle the call. */
|
/* Have UFS handle the call. */
|
||||||
CODADEBUG(CODA_READDIR, myprintf((
|
CODADEBUG(CODA_READDIR, myprintf((
|
||||||
"indirect readdir: fid = %s, refcnt = %d\n",
|
"indirect readdir: fid = %s, refcnt = %d\n",
|
||||||
coda_f2s(&cp->c_fid), vp->v_usecount)); )
|
coda_f2s(&cp->c_fid), vp->v_usecount)); )
|
||||||
error = VOP_READDIR(cp->c_ovp, uiop, cred, eofflag, cookies,
|
error = VOP_READDIR(vp, uiop, cred, eofflag, cookies, ncookies);
|
||||||
ncookies);
|
|
||||||
if (error)
|
if (error)
|
||||||
MARK_INT_FAIL(CODA_READDIR_STATS);
|
MARK_INT_FAIL(CODA_READDIR_STATS);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue