Skip to contentSkip to conversation

sctp: sm_statefuns: Remove unnecessary ‘NULL’ values from Pointer

PATCH In review Li zeming 2 participants 2 messages Nov 18, 2022 – Nov 19, 2022

Subsystems (3)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH v2 1/1 sctp: sm_statefuns: Remove unnecessary ‘NULL’ values from Pointer

The 'packet' pointer is always set in the later code, no need to initialize it at definition time.

---
v2: Modify the submitted description.

 net/sctp/sm_statefuns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sctp/sm_statefuns.c +1 -1
index f6ee7f4040c1..714605746fee 100644
@@ -3781,7 +3781,7 @@ static enum sctp_disposition sctp_sf_shut_8_4_5(
 					void *arg,
 					struct sctp_cmd_seq *commands)
 {
-	struct sctp_packet *packet = NULL;
+	struct sctp_packet *packet;
 	struct sctp_chunk *chunk = arg;
 	struct sctp_chunk *shut;
 
Signature · 1 line
2.18.2
maintainer
#1 lore raw

net/sctp/sm_statefuns.c static enum sctp_disposition sctp_sf_shut_8_4_5( · line 3786

Quoted 4 lines · On Fri, 18 Nov 2022 09:46:42 +0800 Li zeming wrote:
net/sctp/sm_statefuns.c +1 -1
-	struct sctp_packet *packet = NULL;
+	struct sctp_packet *packet;
 	struct sctp_chunk *chunk = arg;
 	struct sctp_chunk *shut;

Please don't sent such patches to networking.