From 0463ee1f28946cc49815737daa0ced0c68f39f0b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 4 Oct 2007 16:24:00 +0000 Subject: Delete empty ->init() functions Deletes empty ->init() functions. ip[6]tables already checks for .init being NULL or not. Signed-off-by: Jan Engelhardt --- extensions/libip6t_HL.c | 5 ----- extensions/libip6t_policy.c | 5 ----- extensions/libipt_CLUSTERIP.c | 6 ------ extensions/libipt_ECN.c | 5 ----- extensions/libipt_MIRROR.c | 7 ------- extensions/libipt_TOS.c | 7 ------- extensions/libipt_TTL.c | 5 ----- extensions/libipt_policy.c | 5 ----- extensions/libxt_CLASSIFY.c | 8 -------- extensions/libxt_CONNMARK.c | 8 -------- extensions/libxt_DSCP.c | 7 ------- extensions/libxt_MARK.c | 9 --------- extensions/libxt_NFQUEUE.c | 6 ------ extensions/libxt_NOTRACK.c | 8 -------- extensions/libxt_SECMARK.c | 6 ------ extensions/libxt_TCPMSS.c | 8 -------- extensions/libxt_TRACE.c | 8 -------- extensions/libxt_multiport.c | 10 ---------- extensions/libxt_physdev.c | 7 ------- extensions/libxt_standard.c | 8 -------- 20 files changed, 138 deletions(-) (limited to 'extensions') diff --git a/extensions/libip6t_HL.c b/extensions/libip6t_HL.c index 49ebfbc2..c8bdd027 100644 --- a/extensions/libip6t_HL.c +++ b/extensions/libip6t_HL.c @@ -16,10 +16,6 @@ #define IP6T_HL_USED 1 -static void init(struct xt_entry_target *t) -{ -} - static void help(void) { printf( @@ -152,7 +148,6 @@ struct ip6tables_target HL = { .size = IP6T_ALIGN(sizeof(struct ip6t_HL_info)), .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_HL_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libip6t_policy.c b/extensions/libip6t_policy.c index d6227242..28caf03b 100644 --- a/extensions/libip6t_policy.c +++ b/extensions/libip6t_policy.c @@ -133,10 +133,6 @@ extern void parse_hostnetworkmask(const char *name, struct in6_addr **addrpp, /* End duplicated code from ip6tables.c */ -static void init(struct xt_entry_match *m) -{ -} - static int parse_direction(char *s) { if (strcmp(s, "in") == 0) @@ -462,7 +458,6 @@ struct ip6tables_match policy = { .size = IP6T_ALIGN(sizeof(struct ip6t_policy_info)), .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_policy_info)), .help = help, - .init = init, .parse = parse, .final_check = final_check, .print = print, diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c index 384dbdf0..7e8bd437 100644 --- a/extensions/libipt_CLUSTERIP.c +++ b/extensions/libipt_CLUSTERIP.c @@ -54,11 +54,6 @@ static const struct option opts[] = { { } }; -static void -init(struct xt_entry_target *t) -{ -} - static void parse_mac(const char *mac, char *macbuf) { @@ -253,7 +248,6 @@ static struct iptables_target clusterip = { .size = IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info)), .userspacesize = offsetof(struct ipt_clusterip_tgt_info, config), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libipt_ECN.c b/extensions/libipt_ECN.c index 83123f3a..8a73d9b5 100644 --- a/extensions/libipt_ECN.c +++ b/extensions/libipt_ECN.c @@ -17,10 +17,6 @@ #include #include -static void init(struct xt_entry_target *t) -{ -} - static void help(void) { printf( @@ -170,7 +166,6 @@ struct iptables_target ecn = { .size = IPT_ALIGN(sizeof(struct ipt_ECN_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_ECN_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c index 255f4c2f..292b13dc 100644 --- a/extensions/libipt_MIRROR.c +++ b/extensions/libipt_MIRROR.c @@ -16,12 +16,6 @@ help(void) IPTABLES_VERSION); } -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -43,7 +37,6 @@ static struct iptables_target mirror = { .size = IPT_ALIGN(0), .userspacesize = IPT_ALIGN(0), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = NULL, diff --git a/extensions/libipt_TOS.c b/extensions/libipt_TOS.c index f54b08f3..dac86149 100644 --- a/extensions/libipt_TOS.c +++ b/extensions/libipt_TOS.c @@ -52,12 +52,6 @@ static const struct option opts[] = { { } }; -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - static void parse_tos(const char *s, struct ipt_tos_target_info *info) { @@ -159,7 +153,6 @@ static struct iptables_target tos = { .size = IPT_ALIGN(sizeof(struct ipt_tos_target_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_tos_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libipt_TTL.c b/extensions/libipt_TTL.c index 644c7c46..6af5c76b 100644 --- a/extensions/libipt_TTL.c +++ b/extensions/libipt_TTL.c @@ -16,10 +16,6 @@ #define IPT_TTL_USED 1 -static void init(struct xt_entry_target *t) -{ -} - static void help(void) { printf( @@ -152,7 +148,6 @@ static struct iptables_target TTL = { .size = IPT_ALIGN(sizeof(struct ipt_TTL_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_TTL_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libipt_policy.c b/extensions/libipt_policy.c index 6d6013dc..ddafed1d 100644 --- a/extensions/libipt_policy.c +++ b/extensions/libipt_policy.c @@ -93,10 +93,6 @@ static const struct option opts[] = { } }; -static void init(struct xt_entry_match *m) -{ -} - static int parse_direction(char *s) { if (strcmp(s, "in") == 0) @@ -420,7 +416,6 @@ struct iptables_match policy = { .size = IPT_ALIGN(sizeof(struct ipt_policy_info)), .userspacesize = IPT_ALIGN(sizeof(struct ipt_policy_info)), .help = help, - .init = init, .parse = parse, .final_check = final_check, .print = print, diff --git a/extensions/libxt_CLASSIFY.c b/extensions/libxt_CLASSIFY.c index 08ad8b2b..605c47e0 100644 --- a/extensions/libxt_CLASSIFY.c +++ b/extensions/libxt_CLASSIFY.c @@ -26,12 +26,6 @@ static const struct option opts[] = { { } }; -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - int string_to_priority(const char *s, unsigned int *p) { unsigned int i, j; @@ -115,7 +109,6 @@ static struct xtables_target classify = { .size = XT_ALIGN(sizeof(struct xt_classify_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_classify_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -130,7 +123,6 @@ static struct xtables_target classify6 = { .size = XT_ALIGN(sizeof(struct xt_classify_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_classify_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_CONNMARK.c b/extensions/libxt_CONNMARK.c index 4bb068e4..9a130746 100644 --- a/extensions/libxt_CONNMARK.c +++ b/extensions/libxt_CONNMARK.c @@ -56,12 +56,6 @@ static const struct option opts[] = { { } }; -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -207,7 +201,6 @@ static struct xtables_target connmark_target = { .size = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -222,7 +215,6 @@ static struct xtables_target connmark_target6 = { .size = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_DSCP.c b/extensions/libxt_DSCP.c index 44e03cef..38e02c7f 100644 --- a/extensions/libxt_DSCP.c +++ b/extensions/libxt_DSCP.c @@ -21,11 +21,6 @@ /* This is evil, but it's my code - HW*/ #include "libipt_dscp_helper.c" - -static void init(struct xt_entry_target *t) -{ -} - static void help(void) { printf( @@ -150,7 +145,6 @@ static struct xtables_target dscp = { .size = XT_ALIGN(sizeof(struct xt_DSCP_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_DSCP_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -165,7 +159,6 @@ static struct xtables_target dscp6 = { .size = XT_ALIGN(sizeof(struct xt_DSCP_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_DSCP_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c index 423e0f2a..ddfa3236 100644 --- a/extensions/libxt_MARK.c +++ b/extensions/libxt_MARK.c @@ -28,12 +28,6 @@ static const struct option opts[] = { { } }; -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -192,7 +186,6 @@ static struct xtables_target mark_v0 = { .size = XT_ALIGN(sizeof(struct xt_mark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_mark_target_info)), .help = &help, - .init = &init, .parse = &parse_v0, .final_check = &final_check, .print = &print_v0, @@ -208,7 +201,6 @@ static struct xtables_target mark_v1 = { .size = XT_ALIGN(sizeof(struct xt_mark_target_info_v1)), .userspacesize = XT_ALIGN(sizeof(struct xt_mark_target_info_v1)), .help = &help, - .init = &init, .parse = &parse_v1, .final_check = &final_check, .print = &print_v1, @@ -224,7 +216,6 @@ static struct xtables_target mark6_v0 = { .size = XT_ALIGN(sizeof(struct xt_mark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_mark_target_info)), .help = &help, - .init = &init, .parse = &parse_v0, .final_check = &final_check, .print = &print_v0, diff --git a/extensions/libxt_NFQUEUE.c b/extensions/libxt_NFQUEUE.c index 293ef1f0..f023bbcf 100644 --- a/extensions/libxt_NFQUEUE.c +++ b/extensions/libxt_NFQUEUE.c @@ -14,10 +14,6 @@ #include #include -static void init(struct xt_entry_target *t) -{ -} - static void help(void) { printf( @@ -100,7 +96,6 @@ static struct xtables_target nfqueue = { .size = XT_ALIGN(sizeof(struct xt_NFQ_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_NFQ_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -115,7 +110,6 @@ static struct xtables_target nfqueue6 = { .size = XT_ALIGN(sizeof(struct xt_NFQ_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_NFQ_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_NOTRACK.c b/extensions/libxt_NOTRACK.c index 4973303c..8e237539 100644 --- a/extensions/libxt_NOTRACK.c +++ b/extensions/libxt_NOTRACK.c @@ -16,12 +16,6 @@ help(void) IPTABLES_VERSION); } -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -46,7 +40,6 @@ struct xtables_target notrack = .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, }; @@ -60,7 +53,6 @@ struct xtables_target notrack6 = .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, }; diff --git a/extensions/libxt_SECMARK.c b/extensions/libxt_SECMARK.c index d0c21a94..9db1514d 100644 --- a/extensions/libxt_SECMARK.c +++ b/extensions/libxt_SECMARK.c @@ -28,10 +28,6 @@ static const struct option opts[] = { { 0 } }; -/* Initialize the target. */ -static void init(struct xt_entry_target *t) -{ } - /* * Function which parses command options; returns true if it * ate an option. @@ -111,7 +107,6 @@ static struct xtables_target secmark = { .size = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -127,7 +122,6 @@ static struct xtables_target secmark6 = { .size = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_secmark_target_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_TCPMSS.c b/extensions/libxt_TCPMSS.c index 304cf718..74014107 100644 --- a/extensions/libxt_TCPMSS.c +++ b/extensions/libxt_TCPMSS.c @@ -42,12 +42,6 @@ static const struct option opts[] = { { } }; -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -146,7 +140,6 @@ static struct xtables_target mss = { .size = XT_ALIGN(sizeof(struct xt_tcpmss_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_tcpmss_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -161,7 +154,6 @@ static struct xtables_target mss6 = { .size = XT_ALIGN(sizeof(struct xt_tcpmss_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_tcpmss_info)), .help = &help6, - .init = &init, .parse = &parse6, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_TRACE.c b/extensions/libxt_TRACE.c index e6761f0f..afe5498d 100644 --- a/extensions/libxt_TRACE.c +++ b/extensions/libxt_TRACE.c @@ -16,12 +16,6 @@ help(void) IPTABLES_VERSION); } -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -44,7 +38,6 @@ static struct xtables_target trace = { .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = NULL, /* print */ @@ -58,7 +51,6 @@ static struct xtables_target trace6 = { .size = XT_ALIGN(0), .userspacesize = XT_ALIGN(0), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = NULL, /* print */ diff --git a/extensions/libxt_multiport.c b/extensions/libxt_multiport.c index d47c3724..9abd13eb 100644 --- a/extensions/libxt_multiport.c +++ b/extensions/libxt_multiport.c @@ -133,12 +133,6 @@ parse_multi_ports_v1(const char *portstring, free(buffer); } -/* Initialize the match. */ -static void -init(struct xt_entry_match *m) -{ -} - static const char * check_proto(u_int16_t pnum, u_int8_t invflags) { @@ -523,7 +517,6 @@ static struct xtables_match multiport = { .size = XT_ALIGN(sizeof(struct xt_multiport)), .userspacesize = XT_ALIGN(sizeof(struct xt_multiport)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -539,7 +532,6 @@ static struct xtables_match multiport6 = { .size = XT_ALIGN(sizeof(struct xt_multiport)), .userspacesize = XT_ALIGN(sizeof(struct xt_multiport)), .help = &help, - .init = &init, .parse = &parse6, .final_check = &final_check, .print = &print6, @@ -555,7 +547,6 @@ static struct xtables_match multiport_v1 = { .size = XT_ALIGN(sizeof(struct xt_multiport_v1)), .userspacesize = XT_ALIGN(sizeof(struct xt_multiport_v1)), .help = &help_v1, - .init = &init, .parse = &parse_v1, .final_check = &final_check, .print = &print_v1, @@ -571,7 +562,6 @@ static struct xtables_match multiport6_v1 = { .size = XT_ALIGN(sizeof(struct xt_multiport_v1)), .userspacesize = XT_ALIGN(sizeof(struct xt_multiport_v1)), .help = &help_v1, - .init = &init, .parse = &parse6_v1, .final_check = &final_check, .print = &print6_v1, diff --git a/extensions/libxt_physdev.c b/extensions/libxt_physdev.c index 2be6bd18..3ddb702b 100644 --- a/extensions/libxt_physdev.c +++ b/extensions/libxt_physdev.c @@ -34,11 +34,6 @@ static const struct option opts[] = { { } }; -static void -init(struct xt_entry_match *m) -{ -} - static int parse(int c, char **argv, int invert, unsigned int *flags, const void *entry, @@ -178,7 +173,6 @@ static struct xtables_match physdev = { .size = XT_ALIGN(sizeof(struct xt_physdev_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_physdev_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, @@ -193,7 +187,6 @@ static struct xtables_match physdev6 = { .size = XT_ALIGN(sizeof(struct xt_physdev_info)), .userspacesize = XT_ALIGN(sizeof(struct xt_physdev_info)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = &print, diff --git a/extensions/libxt_standard.c b/extensions/libxt_standard.c index ccdb599b..48ba85a2 100644 --- a/extensions/libxt_standard.c +++ b/extensions/libxt_standard.c @@ -16,12 +16,6 @@ help(void) "(If target is DROP, ACCEPT, RETURN or nothing)\n", IPTABLES_VERSION); } -/* Initialize the target. */ -static void -init(struct xt_entry_target *t) -{ -} - /* Function which parses command options; returns true if it ate an option */ static int @@ -51,7 +45,6 @@ struct xtables_target standard = { .size = XT_ALIGN(sizeof(int)), .userspacesize = XT_ALIGN(sizeof(int)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = NULL, @@ -66,7 +59,6 @@ struct xtables_target standard6 = { .size = XT_ALIGN(sizeof(int)), .userspacesize = XT_ALIGN(sizeof(int)), .help = &help, - .init = &init, .parse = &parse, .final_check = &final_check, .print = NULL, -- cgit v1.2.3