From: Stephen Hemminger Date: Thu, 15 Nov 2018 22:36:39 +0000 (-0800) Subject: tc/pedit: use structure initialization X-Git-Tag: v4.20.0~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=946a135c580bee27f7323c45713d363148ccee31;p=thirdparty%2Fiproute2.git tc/pedit: use structure initialization The pedit callback structure table should be iniatialized using structure initialization to avoid structure changes problems. Signed-off-by: Stephen Hemminger --- diff --git a/tc/p_eth.c b/tc/p_eth.c index 53ce736a1..674f9c112 100644 --- a/tc/p_eth.c +++ b/tc/p_eth.c @@ -68,7 +68,6 @@ done: } struct m_pedit_util p_pedit_eth = { - NULL, - "eth", - parse_eth, + .id = "eth", + .parse_peopt = parse_eth, }; diff --git a/tc/p_icmp.c b/tc/p_icmp.c index 2c1baf82f..15ce32309 100644 --- a/tc/p_icmp.c +++ b/tc/p_icmp.c @@ -55,7 +55,6 @@ done: } struct m_pedit_util p_pedit_icmp = { - NULL, - "icmp", - parse_icmp, + .id = "icmp", + .parse_peopt = parse_icmp, }; diff --git a/tc/p_ip.c b/tc/p_ip.c index e9fd6f834..c385ac6db 100644 --- a/tc/p_ip.c +++ b/tc/p_ip.c @@ -156,7 +156,6 @@ done: } struct m_pedit_util p_pedit_ip = { - NULL, - "ip", - parse_ip, + .id = "ip", + .parse_peopt = parse_ip, }; diff --git a/tc/p_ip6.c b/tc/p_ip6.c index bc45ab70d..dbfdca42c 100644 --- a/tc/p_ip6.c +++ b/tc/p_ip6.c @@ -84,7 +84,6 @@ done: } struct m_pedit_util p_pedit_ip6 = { - NULL, - "ipv6", - parse_ip6, + .id = "ipv6", + .parse_peopt = parse_ip6, }; diff --git a/tc/p_tcp.c b/tc/p_tcp.c index eeb68fcf8..d2dbfd719 100644 --- a/tc/p_tcp.c +++ b/tc/p_tcp.c @@ -67,7 +67,6 @@ done: return res; } struct m_pedit_util p_pedit_tcp = { - NULL, - "tcp", - parse_tcp, + .id = "tcp", + .parse_peopt = parse_tcp, }; diff --git a/tc/p_udp.c b/tc/p_udp.c index 68c688efd..bab456de9 100644 --- a/tc/p_udp.c +++ b/tc/p_udp.c @@ -61,7 +61,6 @@ done: } struct m_pedit_util p_pedit_udp = { - NULL, - "udp", - parse_udp, + .id = "udp", + .parse_peopt = parse_udp, };