[PATCH ulogd2 v2 v2 13/34] output: remove zero-initialized `struct ulogd_plugin` members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Struct members are zero-initialized as a matter of course.

Use consistent formatting.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 output/dbi/ulogd_output_DBI.c         | 10 ++++------
 output/ipfix/ulogd_output_IPFIX.c     | 20 ++++++++++----------
 output/mysql/ulogd_output_MYSQL.c     | 22 ++++++++++------------
 output/pcap/ulogd_output_PCAP.c       |  6 +++---
 output/pgsql/ulogd_output_PGSQL.c     | 10 ++++------
 output/sqlite3/ulogd_output_SQLITE3.c | 18 +++++++++---------
 6 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/output/dbi/ulogd_output_DBI.c b/output/dbi/ulogd_output_DBI.c
index 88b530ead034..6312ac1649e2 100644
--- a/output/dbi/ulogd_output_DBI.c
+++ b/output/dbi/ulogd_output_DBI.c
@@ -287,16 +287,14 @@ static int configure_dbi(struct ulogd_pluginstance *upi,
 }
 
 static struct ulogd_plugin dbi_plugin = {
-	.name 		= "DBI",
-	.input 		= {
-		.keys	= NULL,
-		.num_keys = 0,
+	.name		= "DBI",
+	.input		= {
 		.type	= ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW,
 	},
-	.output 	= {
+	.output		= {
 		.type	= ULOGD_DTYPE_SINK,
 	},
-	.config_kset 	= &dbi_kset,
+	.config_kset	= &dbi_kset,
 	.priv_size	= sizeof(struct dbi_instance),
 	.configure	= &configure_dbi,
 	.start		= &ulogd_db_start,
diff --git a/output/ipfix/ulogd_output_IPFIX.c b/output/ipfix/ulogd_output_IPFIX.c
index 45fd36bc271c..f252ec72b5f6 100644
--- a/output/ipfix/ulogd_output_IPFIX.c
+++ b/output/ipfix/ulogd_output_IPFIX.c
@@ -486,22 +486,22 @@ again:
 }
 
 static struct ulogd_plugin ipfix_plugin = {
-	.name = "IPFIX",
-	.input = {
+	.name           = "IPFIX",
+	.input          = {
 		.keys = ipfix_in_keys,
 		.num_keys = ARRAY_SIZE(ipfix_in_keys),
 		.type = ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW | ULOGD_DTYPE_SUM
 	},
-	.output = {
+	.output         = {
 		.type = ULOGD_DTYPE_SINK
 	},
-	.config_kset = (struct config_keyset *) &ipfix_kset,
-	.priv_size = sizeof(struct ipfix_priv),
-	.configure = ipfix_configure,
-	.start = ipfix_start,
-	.stop = ipfix_stop,
-	.interp = ipfix_interp,
-	.version = VERSION,
+	.config_kset    = (struct config_keyset *) &ipfix_kset,
+	.priv_size      = sizeof(struct ipfix_priv),
+	.configure      = ipfix_configure,
+	.start          = ipfix_start,
+	.stop           = ipfix_stop,
+	.interp         = ipfix_interp,
+	.version        = VERSION,
 };
 
 static void __attribute__ ((constructor)) init(void)
diff --git a/output/mysql/ulogd_output_MYSQL.c b/output/mysql/ulogd_output_MYSQL.c
index c98b98284748..5891207d5990 100644
--- a/output/mysql/ulogd_output_MYSQL.c
+++ b/output/mysql/ulogd_output_MYSQL.c
@@ -259,23 +259,21 @@ static int configure_mysql(struct ulogd_pluginstance *upi,
 }
 
 static struct ulogd_plugin plugin_mysql = {
-	.name = "MYSQL",
-	.input = {
-		.keys = NULL,
-		.num_keys = 0,
+	.name	     = "MYSQL",
+	.input	     = {
 		.type = ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW,
 	},
-	.output = {
+	.output	     = {
 		.type = ULOGD_DTYPE_SINK,
 	},
 	.config_kset = &kset_mysql,
-	.priv_size = sizeof(struct mysql_instance),
-	.configure = &configure_mysql,
-	.start	   = &ulogd_db_start,
-	.stop	   = &ulogd_db_stop,
-	.signal	   = &ulogd_db_signal,
-	.interp	   = &ulogd_db_interp,
-	.version   = VERSION,
+	.priv_size   = sizeof(struct mysql_instance),
+	.configure   = &configure_mysql,
+	.start	     = &ulogd_db_start,
+	.stop	     = &ulogd_db_stop,
+	.signal	     = &ulogd_db_signal,
+	.interp	     = &ulogd_db_interp,
+	.version     = VERSION,
 };
 
 static void __attribute__ ((constructor)) init(void)
diff --git a/output/pcap/ulogd_output_PCAP.c b/output/pcap/ulogd_output_PCAP.c
index 5f9fde3c48ed..5336f88e539d 100644
--- a/output/pcap/ulogd_output_PCAP.c
+++ b/output/pcap/ulogd_output_PCAP.c
@@ -287,13 +287,13 @@ static int stop_pcap(struct ulogd_pluginstance *upi)
 }
 
 static struct ulogd_plugin pcap_plugin = {
-	.name = "PCAP",
-	.input = {
+	.name		= "PCAP",
+	.input		= {
 		.keys = pcap_keys,
 		.num_keys = ARRAY_SIZE(pcap_keys),
 		.type = ULOGD_DTYPE_PACKET,
 	},
-	.output = {
+	.output		= {
 		.type = ULOGD_DTYPE_SINK,
 	},
 	.config_kset	= &pcap_kset,
diff --git a/output/pgsql/ulogd_output_PGSQL.c b/output/pgsql/ulogd_output_PGSQL.c
index b798555b5ade..bc0eae7558b3 100644
--- a/output/pgsql/ulogd_output_PGSQL.c
+++ b/output/pgsql/ulogd_output_PGSQL.c
@@ -337,16 +337,14 @@ static int configure_pgsql(struct ulogd_pluginstance *upi,
 }
 
 static struct ulogd_plugin pgsql_plugin = {
-	.name 		= "PGSQL",
-	.input 		= {
-		.keys	= NULL,
-		.num_keys = 0,
+	.name		= "PGSQL",
+	.input		= {
 		.type	= ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW,
 	},
-	.output 	= {
+	.output		= {
 		.type	= ULOGD_DTYPE_SINK,
 	},
-	.config_kset 	= &pgsql_kset,
+	.config_kset	= &pgsql_kset,
 	.priv_size	= sizeof(struct pgsql_instance),
 	.configure	= &configure_pgsql,
 	.start		= &ulogd_db_start,
diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index 40d99ca3b249..32459dd6c4c5 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -419,20 +419,20 @@ sqlite3_stop(struct ulogd_pluginstance *pi)
 }
 
 static struct ulogd_plugin sqlite3_plugin = {
-	.name = "SQLITE3",
-	.input = {
+	.name	     = "SQLITE3",
+	.input	     = {
 		.type = ULOGD_DTYPE_PACKET | ULOGD_DTYPE_FLOW,
 	},
-	.output = {
+	.output	     = {
 		.type = ULOGD_DTYPE_SINK,
 	},
 	.config_kset = &sqlite3_kset,
-	.priv_size = sizeof(struct sqlite3_priv),
-	.configure = sqlite3_configure,
-	.start = sqlite3_start,
-	.stop = sqlite3_stop,
-	.interp = sqlite3_interp,
-	.version = VERSION,
+	.priv_size   = sizeof(struct sqlite3_priv),
+	.configure   = sqlite3_configure,
+	.start	     = sqlite3_start,
+	.stop	     = sqlite3_stop,
+	.interp	     = sqlite3_interp,
+	.version     = VERSION,
 };
 
 static void __attribute__ ((constructor)) init(void)
-- 
2.35.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux