Skip to contentSkip to conversation

NFSD: Initialize pointer ni with NULL and not plain integer 0

PATCH New Colin King 1 participant 1 message Sep 25, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 NFSD: Initialize pointer ni with NULL and not plain integer 0

From: Colin Ian King <[email protected]>

Pointer ni is being initialized with plain integer zero. Fix this by initializing with NULL.

---
 fs/nfsd/nfs4proc.c  | 2 +-
 fs/nfsd/nfs4state.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4proc.c +1 -1
index 3f7e59ec4e32..3dc40c1d32bc 100644
@@ -1178,7 +1178,7 @@ extern void nfs_sb_deactive(struct super_block *sb);
 static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
 		struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt)
 {
-	struct nfsd4_ssc_umount_item *ni = 0;
+	struct nfsd4_ssc_umount_item *ni = NULL;
 	struct nfsd4_ssc_umount_item *work = NULL;
 	struct nfsd4_ssc_umount_item *tmp;
 	DEFINE_WAIT(wait);
fs/nfsd/nfs4state.c +1 -1
index 8b7e9b28c109..bfad94c70b84 100644
@@ -5541,7 +5541,7 @@ static void nfsd4_ssc_shutdown_umount(struct nfsd_net *nn)
 static void nfsd4_ssc_expire_umount(struct nfsd_net *nn)
 {
 	bool do_wakeup = false;
-	struct nfsd4_ssc_umount_item *ni = 0;
+	struct nfsd4_ssc_umount_item *ni = NULL;
 	struct nfsd4_ssc_umount_item *tmp;
 
 	spin_lock(&nn->nfsd_ssc_lock);
Signature · 1 line
2.32.0