Skip to contentSkip to conversation

Add C99 initializers for net/ipv6/netfilter code

PATCH Applied Art Haas 2 participants 2 messages Mar 16, 2003 – Mar 20, 2003

Subsystems (2)
lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 Add C99 initializers for net/ipv6/netfilter code

Hi.

Here is the promised patch set for the ipv6 code.

Art Haas

===== net/ipv6/netfilter/ip6_queue.c 1.7 vs edited =====

net/ipv6/netfilter/ip6_queue.c +2 -8
@@ -558,9 +558,7 @@
 }
 
 static struct notifier_block ipq_dev_notifier = {
-	ipq_rcv_dev_event,
-	NULL,
-	0
+	.notifier_call	= ipq_rcv_dev_event,
 };
 
 static int
@@ -580,9 +578,7 @@
 }
 
 static struct notifier_block ipq_nl_notifier = {
-	ipq_rcv_nl_event,
-	NULL,
-	0
+	.notifier_call	= ipq_rcv_nl_event,
 };
 
 static int sysctl_maxlen = IPQ_QMAX_DEFAULT;
@@ -604,7 +600,6 @@
 	{
 		.ctl_name	= NET_IPV6,
 		.procname	= "ipv6",
-		.maxlen		= 0,
 		.mode		= 0555,
 		.child		= ipq_table
 	},
@@ -615,7 +610,6 @@
 	{
 		.ctl_name	= CTL_NET,
 		.procname	= "net",
-		.maxlen		= 0,
 		.mode		= 0555,
 		.child		= ipq_dir_table
 	},

===== net/ipv6/netfilter/ip6_tables.c 1.14 vs edited =====

net/ipv6/netfilter/ip6_tables.c +34 -13

55 lines not on this page · raw message

===== net/ipv6/netfilter/ip6t_ah.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_ah.c +6 -2
@@ -200,8 +200,12 @@
        return 1;
 }
 
-static struct ip6t_match ah_match
-= { { NULL, NULL }, "ah", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match ah_match = {
+	.name		= "ah",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_dst.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_dst.c +6 -3
@@ -265,12 +265,15 @@
        return 1;
 }
 
-static struct ip6t_match opts_match
+static struct ip6t_match opts_match = {
 #if HOPBYHOP
-= { { NULL, NULL }, "hbh", &match, &checkentry, NULL, THIS_MODULE };
+	.name		= "hbh",
 #else
-= { { NULL, NULL }, "dst", &match, &checkentry, NULL, THIS_MODULE };
+	.name		= "dst",
 #endif
+	.match		= &match,
+	.checkentry	= &checkentry,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_esp.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_esp.c +6 -2
@@ -168,8 +168,12 @@
 	return 1;
 }
 
-static struct ip6t_match esp_match
-= { { NULL, NULL }, "esp", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match esp_match = {
+	.name		= "esp",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_eui64.c 1.1 vs edited =====

net/ipv6/netfilter/ip6t_eui64.c +6 -2
@@ -69,8 +69,12 @@
 	return 1;
 }
 
-static struct ip6t_match eui64_match
-= { { NULL, NULL }, "eui64", &match, &ip6t_eui64_checkentry, NULL, THIS_MODULE };
+static struct ip6t_match eui64_match = {
+	.name		= "eui64",
+	.match		= &match,
+	.checkentry	= &ip6t_eui64_checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_frag.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_frag.c +6 -2
@@ -232,8 +232,12 @@
        return 1;
 }
 
-static struct ip6t_match frag_match
-= { { NULL, NULL }, "frag", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match frag_match = {
+	.name		= "frag",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_hbh.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_hbh.c +7 -3
@@ -265,12 +265,16 @@
        return 1;
 }
 
-static struct ip6t_match opts_match
+static struct ip6t_match opts_match = {
 #if HOPBYHOP
-= { { NULL, NULL }, "hbh", &match, &checkentry, NULL, THIS_MODULE };
+	.name		= "hbh",
 #else
-= { { NULL, NULL }, "dst", &match, &checkentry, NULL, THIS_MODULE };
+	.name		= "dst",
 #endif
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_hl.c 1.1 vs edited =====

net/ipv6/netfilter/ip6t_hl.c +6 -2
@@ -56,8 +56,12 @@
 	return 1;
 }
 
-static struct ip6t_match hl_match = { { NULL, NULL }, "hl", &match,
-		&checkentry, NULL, THIS_MODULE };
+static struct ip6t_match hl_match = {
+	.name		= "hl",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_ipv6header.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_ipv6header.c +6 -8
@@ -196,14 +196,12 @@
 	return;
 }
 
-static struct ip6t_match
-ip6t_ipv6header_match = {
-	{ NULL, NULL },
-	"ipv6header",
-	&ipv6header_match,
-	&ipv6header_checkentry,
-	&ipv6header_destroy,
-	THIS_MODULE
+static struct ip6t_match ip6t_ipv6header_match = {
+	.name		= "ipv6header",
+	.match		= &ipv6header_match,
+	.checkentry	= &ipv6header_checkentry,
+	.destroy	= &ipv6header_destroy,
+	.me		= THIS_MODULE,
 };
 
 static int  __init ipv6header_init(void)

===== net/ipv6/netfilter/ip6t_length.c 1.1 vs edited =====

net/ipv6/netfilter/ip6t_length.c +6 -2
@@ -34,8 +34,12 @@
 	return 1;
 }
 
-static struct ip6t_match length_match
-= { { NULL, NULL }, "length", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match length_match = {
+	.name		= "length",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_limit.c 1.3 vs edited =====

net/ipv6/netfilter/ip6t_limit.c +6 -3
@@ -115,9 +115,12 @@
 	return 1;
 }
 
-static struct ip6t_match ip6t_limit_reg
-= { { NULL, NULL }, "limit", ip6t_limit_match, ip6t_limit_checkentry, NULL,
-    THIS_MODULE };
+static struct ip6t_match ip6t_limit_reg = {
+	.name		= "limit",
+	.match		= ip6t_limit_match,
+	.checkentry	= ip6t_limit_checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_mac.c 1.4 vs edited =====

net/ipv6/netfilter/ip6t_mac.c +6 -2
@@ -47,8 +47,12 @@
 	return 1;
 }
 
-static struct ip6t_match mac_match
-= { { NULL, NULL }, "mac", &match, &ip6t_mac_checkentry, NULL, THIS_MODULE };
+static struct ip6t_match mac_match = {
+	.name		= "mac",
+	.match		= &match,
+	.checkentry	= &ip6t_mac_checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_mark.c 1.3 vs edited =====

net/ipv6/netfilter/ip6t_mark.c +6 -2
@@ -33,8 +33,12 @@
 	return 1;
 }
 
-static struct ip6t_match mark_match
-= { { NULL, NULL }, "mark", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match mark_match = {
+	.name		= "mark",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_multiport.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_multiport.c +6 -2
@@ -84,8 +84,12 @@
 		&& multiinfo->count <= IP6T_MULTI_PORTS;
 }
 
-static struct ip6t_match multiport_match
-= { { NULL, NULL }, "multiport", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match multiport_match = {
+	.name		= "multiport",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_owner.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_owner.c +6 -2
@@ -142,8 +142,12 @@
 	return 1;
 }
 
-static struct ip6t_match owner_match
-= { { NULL, NULL }, "owner", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match owner_match = {
+	.name		= "owner",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {

===== net/ipv6/netfilter/ip6t_rt.c 1.2 vs edited =====

net/ipv6/netfilter/ip6t_rt.c +6 -2
@@ -287,8 +287,12 @@
        return 1;
 }
 
-static struct ip6t_match rt_match
-= { { NULL, NULL }, "rt", &match, &checkentry, NULL, THIS_MODULE };
+static struct ip6t_match rt_match = {
+	.name		= "rt",
+	.match		= &match,
+	.checkentry	= &checkentry,
+	.me		= THIS_MODULE,
+};
 
 static int __init init(void)
 {
Signature · 3 lines
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759