summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-05-22 23:05:48 +0000
committerpjd <pjd@FreeBSD.org>2007-05-22 23:05:48 +0000
commit641a216a630191f19c12e629968f6471f4ebfe40 (patch)
tree11e83876657bd39e8797fa31eaa48713218edd17 /sys/kern/vfs_cache.c
parent4a15a486c9ba78eae859516edd5e51d2c9804308 (diff)
downloadFreeBSD-src-641a216a630191f19c12e629968f6471f4ebfe40.zip
FreeBSD-src-641a216a630191f19c12e629968f6471f4ebfe40.tar.gz
- Remove redundant initialization.
- Compare pointer with NULL.
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 9980803..f639155 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -614,12 +614,11 @@ cache_purgevfs(mp)
struct nchashhead mplist;
LIST_INIT(&mplist);
- ncp = NULL;
/* Scan hash tables for applicable entries */
CACHE_LOCK();
for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
- for (ncp = LIST_FIRST(ncpp); ncp != 0; ncp = nnp) {
+ for (ncp = LIST_FIRST(ncpp); ncp != NULL; ncp = nnp) {
nnp = LIST_NEXT(ncp, nc_hash);
if (ncp->nc_dvp->v_mount == mp) {
LIST_REMOVE(ncp, nc_hash);
OpenPOWER on IntegriCloud