Skip to contentSkip to conversation

kernel: auditfilter: Remove unnecessary ‘0’ values from ret

PATCH Applied Li zeming 2 participants 3 messages Dec 28, 2023 – Jan 25, 2024 Audit

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 kernel: auditfilter: Remove unnecessary ‘0’ values from ret

The ret variable is assigned when it does not need to be defined, as it has already been assigned before use.

---
 kernel/auditfilter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/auditfilter.c +1 -1
index 8317a37dea0bb..be8c680121e46 100644
@@ -788,7 +788,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
 static inline int audit_dupe_lsm_field(struct audit_field *df,
 					   struct audit_field *sf)
 {
-	int ret = 0;
+	int ret;
 	char *lsm_str;
 
 	/* our own copy of lsm_str */
Signature · 1 line
2.18.2
maintainer
#1 lore raw
Quoted 8 lines · Li zeming

The ret variable is assigned when it does not need to be defined, as it has already been assigned before use.

---
 kernel/auditfilter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for the patch, as this is not a critical change it will be processed after the upcoming merge window closes.

Quoted 15 lines
kernel/auditfilter.c +1 -2
index 8317a37dea0bb..be8c680121e46 100644
@@ -788,7 +788,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
 static inline int audit_dupe_lsm_field(struct audit_field *df,
                                           struct audit_field *sf)
 {
-       int ret = 0;
+       int ret;
        char *lsm_str;
 
        /* our own copy of lsm_str */
--

2.18.2

Signature · 1 line
paul-moore.com