* [PATCH] audit: remove unnecessary 'ret' initialization
@ 2021-06-11 2:28 Austin Kim
2021-06-11 17:23 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Austin Kim @ 2021-06-11 2:28 UTC (permalink / raw)
To: jmorris, serge
Cc: linux-security-module, linux-kernel, austin.kim, austindh.kim
From: Austin Kim <austin.kim@lge.com>
The variable 'ret' is set to 0 when declared.
The 'ret' is unused until it is set to 0 again.
So it had better remove unnecessary initialization.
Signed-off-by: Austin Kim <austin.kim@lge.com>
---
security/lsm_audit.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 82ce14933513..5a5016ef43b0 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -119,7 +119,6 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
return -EINVAL;
ad->u.net->v6info.saddr = ip6->saddr;
ad->u.net->v6info.daddr = ip6->daddr;
- ret = 0;
/* IPv6 can have several extension header before the Transport header
* skip them */
offset = skb_network_offset(skb);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] audit: remove unnecessary 'ret' initialization
2021-06-11 2:28 [PATCH] audit: remove unnecessary 'ret' initialization Austin Kim
@ 2021-06-11 17:23 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2021-06-11 17:23 UTC (permalink / raw)
To: Austin Kim
Cc: James Morris, Serge Hallyn, linux-security-module, linux-kernel,
austin.kim
On Thu, Jun 10, 2021 at 10:30 PM Austin Kim <austindh.kim@gmail.com> wrote:
>
> From: Austin Kim <austin.kim@lge.com>
>
> The variable 'ret' is set to 0 when declared.
> The 'ret' is unused until it is set to 0 again.
>
> So it had better remove unnecessary initialization.
>
> Signed-off-by: Austin Kim <austin.kim@lge.com>
> ---
> security/lsm_audit.c | 1 -
> 1 file changed, 1 deletion(-)
Merged into audit/next, thanks.
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-11 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 2:28 [PATCH] audit: remove unnecessary 'ret' initialization Austin Kim
2021-06-11 17:23 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).