Skip to content

Commit

Permalink
lockd: fix sparse warning in svcshare.c
Browse files Browse the repository at this point in the history
fs/lockd/svcshare.c:74:50: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <[email protected]>
Cc: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
hharrison authored and J. Bruce Fields committed Apr 23, 2008
1 parent f2b0dee commit 93245d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/lockd/svcshare.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_share *share, **shpp;
struct xdr_netobj *oh = &argp->lock.oh;

for (shpp = &file->f_shares; (share = *shpp) != 0; shpp = &share->s_next) {
for (shpp = &file->f_shares; (share = *shpp) != NULL;
shpp = &share->s_next) {
if (share->s_host == host && nlm_cmp_owner(share, oh)) {
*shpp = share->s_next;
kfree(share);
Expand Down

0 comments on commit 93245d1

Please sign in to comment.