Skip to content

Commit

Permalink
sctp: delete the nested flexible array payload
Browse files Browse the repository at this point in the history
This patch deletes the flexible-array payload[] from the structure
sctp_datahdr to avoid some sparse warnings:

  # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/
  net/sctp/socket.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h):
  ./include/linux/sctp.h:230:29: warning: nested flexible array

This member is not even used anywhere.

Signed-off-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Apr 21, 2023
1 parent 2ab399a commit dbda0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ struct sctp_datahdr {
__be16 stream;
__be16 ssn;
__u32 ppid;
__u8 payload[];
/* __u8 payload[]; */
};

struct sctp_data_chunk {
Expand Down

0 comments on commit dbda0fb

Please sign in to comment.