Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lockd: fix sparse warning in svcshare.c

fs/lockd/svcshare.c:74:50: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

authored by

Harvey Harrison and committed by
J. Bruce Fields
93245d11 f2b0dee2

+2 -1
+2 -1
fs/lockd/svcshare.c
··· 71 71 struct nlm_share *share, **shpp; 72 72 struct xdr_netobj *oh = &argp->lock.oh; 73 73 74 - for (shpp = &file->f_shares; (share = *shpp) != 0; shpp = &share->s_next) { 74 + for (shpp = &file->f_shares; (share = *shpp) != NULL; 75 + shpp = &share->s_next) { 75 76 if (share->s_host == host && nlm_cmp_owner(share, oh)) { 76 77 *shpp = share->s_next; 77 78 kfree(share);