Skip to content

Commit aa8db49

Browse files
goyalbhumikadavem330
authored andcommitted
ipv4: make net_protocol const
Make these const as they are only passed to a const argument of the function inet_add_protocol. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eb73dde commit aa8db49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/af_inet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ static const struct net_protocol igmp_protocol = {
15961596
};
15971597
#endif
15981598

1599-
static struct net_protocol tcp_protocol = {
1599+
static const struct net_protocol tcp_protocol = {
16001600
.early_demux = tcp_v4_early_demux,
16011601
.early_demux_handler = tcp_v4_early_demux,
16021602
.handler = tcp_v4_rcv,
@@ -1606,7 +1606,7 @@ static struct net_protocol tcp_protocol = {
16061606
.icmp_strict_tag_validation = 1,
16071607
};
16081608

1609-
static struct net_protocol udp_protocol = {
1609+
static const struct net_protocol udp_protocol = {
16101610
.early_demux = udp_v4_early_demux,
16111611
.early_demux_handler = udp_v4_early_demux,
16121612
.handler = udp_rcv,

0 commit comments

Comments
 (0)