Skip to contentSkip to conversation

audit: remove unnecessary 'ret' initialization

PATCH Applied Austin Kim 2 participants 2 messages Jun 11, 2021 Security (LSM)

lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 audit: remove unnecessary 'ret' initialization

From: Austin Kim <[email protected]>

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.

---
 security/lsm_audit.c | 1 -
 1 file changed, 1 deletion(-)
security/lsm_audit.c +0 -1
index 82ce14933513..5a5016ef43b0 100644
@@ -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);
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Austin Kim

From: Austin Kim <[email protected]>

The variable 'ret' is set to 0 when declared.
The 'ret' is unused until it is set to 0 again.

Quoted 6 lines

So it had better remove unnecessary initialization.

---
 security/lsm_audit.c | 1 -
 1 file changed, 1 deletion(-)

Merged into audit/next, thanks.

Signature · 2 lines
paul moore
www.paul-moore.com