]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc/pedit: use structure initialization
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 15 Nov 2018 22:36:39 +0000 (14:36 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 19 Nov 2018 19:42:44 +0000 (11:42 -0800)
The pedit callback structure table should be iniatialized using
structure initialization to avoid structure changes problems.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/p_eth.c
tc/p_icmp.c
tc/p_ip.c
tc/p_ip6.c
tc/p_tcp.c
tc/p_udp.c

index 53ce736a1d78d3aa25aecdf475c2b65b10c8e13d..674f9c11202aa1c9224066626db4f6efa74c0dee 100644 (file)
@@ -68,7 +68,6 @@ done:
 }
 
 struct m_pedit_util p_pedit_eth = {
-       NULL,
-       "eth",
-       parse_eth,
+       .id = "eth",
+       .parse_peopt = parse_eth,
 };
index 2c1baf82f7ad9506c4175be2a879f39780ef3715..15ce32309e398b94ae7042afb5f018740f250949 100644 (file)
@@ -55,7 +55,6 @@ done:
 }
 
 struct m_pedit_util p_pedit_icmp = {
-       NULL,
-       "icmp",
-       parse_icmp,
+       .id = "icmp",
+       .parse_peopt = parse_icmp,
 };
index e9fd6f834efcdd92f66cf47f2de60239eeafde2a..c385ac6dbcaa312a7fd477820a1411825e60a5ac 100644 (file)
--- 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,
 };
index bc45ab70d3191430641debe5f2277f56406496d9..dbfdca42cce75fc50204fa40ae1664ee61ad9bb2 100644 (file)
@@ -84,7 +84,6 @@ done:
 }
 
 struct m_pedit_util p_pedit_ip6 = {
-       NULL,
-       "ipv6",
-       parse_ip6,
+       .id = "ipv6",
+       .parse_peopt = parse_ip6,
 };
index eeb68fcf87b309451d0f20aa0410c68900c1beb5..d2dbfd719526609915805524835e9d82e0a63d1a 100644 (file)
@@ -67,7 +67,6 @@ done:
        return res;
 }
 struct m_pedit_util p_pedit_tcp = {
-       NULL,
-       "tcp",
-       parse_tcp,
+       .id = "tcp",
+       .parse_peopt = parse_tcp,
 };
index 68c688efd11077efb1f14c08ad627c13629966e8..bab456de9831f3ee93ecd98ba8150e67406b05ce 100644 (file)
@@ -61,7 +61,6 @@ done:
 }
 
 struct m_pedit_util p_pedit_udp = {
-       NULL,
-       "udp",
-       parse_udp,
+       .id = "udp",
+       .parse_peopt = parse_udp,
 };