Skip to content

Commit 623b57b

Browse files
Colin Ian Kingdavem330
authored andcommitted
sctp: remove redundant initialization of variable status
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. Also put the variable declarations into reverse christmas tree order. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a65878d commit 623b57b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎net/sctp/protocol.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,15 +1367,15 @@ static struct pernet_operations sctp_ctrlsock_ops = {
13671367
/* Initialize the universe into something sensible. */
13681368
static __init int sctp_init(void)
13691369
{
1370-
int i;
1371-
int status = -EINVAL;
1372-
unsigned long goal;
1373-
unsigned long limit;
13741370
unsigned long nr_pages = totalram_pages();
1371+
unsigned long limit;
1372+
unsigned long goal;
1373+
int max_entry_order;
1374+
int num_entries;
13751375
int max_share;
1376+
int status;
13761377
int order;
1377-
int num_entries;
1378-
int max_entry_order;
1378+
int i;
13791379

13801380
sock_skb_cb_check_size(sizeof(struct sctp_ulpevent));
13811381

0 commit comments

Comments
 (0)