* [PATCH] selinux: Use NULL for pointers
@ 2023-07-21 3:32 Jiapeng Chong
2023-07-21 14:24 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2023-07-21 3:32 UTC (permalink / raw)
To: paul
Cc: stephen.smalley.work, eparis, keescook, tony.luck, gpiccoli,
selinux, linux-kernel, linux-hardening, bpf, Jiapeng Chong,
Abaci Robot
Replace integer constants with NULL.
security/selinux/hooks.c:251:41: warning: Using plain integer as NULL pointer.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5958
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 62072b63b19b..d0818a338fa8 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -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);
}
/*
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selinux: Use NULL for pointers
2023-07-21 3:32 [PATCH] selinux: Use NULL for pointers Jiapeng Chong
@ 2023-07-21 14:24 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2023-07-21 14:24 UTC (permalink / raw)
To: Jiapeng Chong
Cc: stephen.smalley.work, eparis, keescook, tony.luck, gpiccoli,
selinux, linux-kernel, linux-hardening, bpf, Abaci Robot
On Thu, Jul 20, 2023 at 11:32 PM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> Replace integer constants with NULL.
>
> security/selinux/hooks.c:251:41: warning: Using plain integer as NULL pointer.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5958
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> 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/20230720203116.316250-2-paul@paul-moore.com/
--
paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-21 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 3:32 [PATCH] selinux: Use NULL for pointers Jiapeng Chong
2023-07-21 14:24 ` Paul Moore
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.