Skip to contentSkip to conversation

selinux: Use NULL for pointers

PATCH In review Jiapeng Chong 2 participants 2 messages Jul 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selinux: Use NULL for pointers

Replace integer constants with NULL.

security/selinux/hooks.c:251:41: warning: Using plain integer as NULL pointer.

---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/hooks.c +1 -1
index 62072b63b19b..d0818a338fa8 100644
@@ -248,7 +248,7 @@ static void ad_net_init_from_iif(struct common_audit_data *ad,
 				 struct lsm_network_audit *net,
 				 int ifindex, u16 family)
 {
-	__ad_net_init(ad, net, ifindex, 0, family);
+	__ad_net_init(ad, net, ifindex, NULL, family);
 }
 
 /*
Signature · 1 line
2.20.1.7.g153144c
maintainer
#1 lore raw
Quoted 11 lines · Jiapeng Chong

Replace integer constants with NULL.

security/selinux/hooks.c:251:41: warning: Using plain integer as NULL pointer.

---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thank you for your patch, but a patch to address this problem has already been posted to the list.

https://lore.kernel.org/selinux/[email protected]/

Signature · 1 line
paul-moore.com