Thread (3 messages) flat view 3 messages, 2 authors, 2020-07-24

Re: [PATCH] sctp: remove redundant initialization of variable status

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: 2020-07-24 12:55:21
Also in: kernel-janitors, linux-sctp, lkml

On Fri, Jul 24, 2020 at 01:17:53PM +0100, Colin King wrote:
From: Colin Ian King <redacted>

The variable status is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <redacted>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Are you willing to send another to patch to fix the var ordering in
reverse christmass tree in there?
quoted hunk ↗ jump to hunk
---
 net/sctp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 7ecaf7d575c0..a0448f7c64b9 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1368,7 +1368,7 @@ static struct pernet_operations sctp_ctrlsock_ops = {
 static __init int sctp_init(void)
 {
 	int i;
-	int status = -EINVAL;
+	int status;
 	unsigned long goal;
 	unsigned long limit;
 	unsigned long nr_pages = totalram_pages();
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help