[PATCH 1/4] nfs: fix sparse warning in nfs4state.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Harvey Harrison
Date: Wednesday, February 20, 2008 - 1:10 pm

fs/nfs/nfs4state.c:788:34: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 fs/nfs/nfs4state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 6233eb5..b962397 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -785,7 +785,7 @@ static int nfs4_reclaim_locks(struct nfs4_state_recovery_ops *ops, struct nfs4_s
 	struct file_lock *fl;
 	int status = 0;
 
-	for (fl = inode->i_flock; fl != 0; fl = fl->fl_next) {
+	for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
 		if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK)))
 			continue;
 		if (nfs_file_open_context(fl->fl_file)->state != state)
-- 
1.5.4.2.200.g99e75


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] nfs: fix sparse warning in nfs4state.c, Harvey Harrison, (Wed Feb 20, 1:10 pm)
Re: [PATCH 1/4] nfs: fix sparse warning in nfs4state.c, Trond Myklebust, (Wed Feb 20, 1:43 pm)
[PATCH] nfs: fix sparse warnings, Harvey Harrison, (Wed Feb 20, 2:03 pm)
Re: [PATCH] nfs: fix sparse warnings, Trond Myklebust, (Wed Feb 20, 2:14 pm)