]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Delete empty ->init() functions
authorJan Engelhardt <jengelh@medozas.de>
Thu, 4 Oct 2007 16:24:00 +0000 (16:24 +0000)
committerPatrick McHardy <kaber@trash.net>
Thu, 4 Oct 2007 16:24:00 +0000 (16:24 +0000)
Deletes empty ->init() functions. ip[6]tables already
checks for .init being NULL or not.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
20 files changed:
extensions/libip6t_HL.c
extensions/libip6t_policy.c
extensions/libipt_CLUSTERIP.c
extensions/libipt_ECN.c
extensions/libipt_MIRROR.c
extensions/libipt_TOS.c
extensions/libipt_TTL.c
extensions/libipt_policy.c
extensions/libxt_CLASSIFY.c
extensions/libxt_CONNMARK.c
extensions/libxt_DSCP.c
extensions/libxt_MARK.c
extensions/libxt_NFQUEUE.c
extensions/libxt_NOTRACK.c
extensions/libxt_SECMARK.c
extensions/libxt_TCPMSS.c
extensions/libxt_TRACE.c
extensions/libxt_multiport.c
extensions/libxt_physdev.c
extensions/libxt_standard.c

index 49ebfbc28fc6f753c4f0bb4dcca131018f121791..c8bdd027e5941907b934ac4668cae3509a60222d 100644 (file)
 
 #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,
index d62272420743f5eda6aa756cedef76fe66eefc3c..28caf03b75b086d424397a8cc1b2d2e372c045a3 100644 (file)
@@ -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,
index 384dbdf0db88230827b6ba3f280fa17daf01441f..7e8bd4372996b0c9246a24dca0d1ce521e6f8690 100644 (file)
@@ -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,
index 83123f3a8689ccdd6d2b6ee2325e842fde303665..8a73d9b5d0ecd24f84685b17e33e7bf1669f8fbc 100644 (file)
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_ipv4/ipt_ECN.h>
 
-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,
index 255f4c2ff4d5da6bfa938e3ca32f25d355a69c86..292b13dc8d4de7272be58aa181317159dbd673e1 100644 (file)
@@ -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,
index f54b08f3eaae8ad84910f718b0ace8809c77b7f0..dac8614945497e2bebc8ba8ae0f5d94b99597924 100644 (file)
@@ -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,
index 644c7c46035b2dd2dd12c1f625bc174d5eee877e..6af5c76b280695a632ba81ddd6193929bf15ccc8 100644 (file)
 
 #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,
index 6d6013dc6a740deb9a2e44e276b9d5673e91af24..ddafed1def4bf70f076b4e740eae9c9e048fda5b 100644 (file)
@@ -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,
index 08ad8b2be4b5856dae1587d953983b886063f41d..605c47e0cea3168e7182b09b2ed04a7fd6643019 100644 (file)
@@ -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,
index 4bb068e4f40526c52e71225392f21a46c309b278..9a130746d48a9f021c14b4a438fa99492d57f3ad 100644 (file)
@@ -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,
index 44e03cef0cdd6e49a163d790969d915e112e6121..38e02c7f75ce4e5b7c9ef8c1c47fd3411f236f9d 100644 (file)
 /* 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,
index 423e0f2a97d35a3030a46693934e7b9ecb5efd41..ddfa32362edd0d055c71572aebea938333755bea 100644 (file)
@@ -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,
index 293ef1f0b54bb0881a2a7ed9ee7de536798240d0..f023bbcf82524e5fce73a2bd738b6accb748243f 100644 (file)
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_NFQUEUE.h>
 
-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,
index 4973303ccc11dca53d2423a7ea3084d528acb541..8e2375392581743fa08836be7b47add6b4eb8f11 100644 (file)
@@ -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,
 };
index d0c21a943f6d7240401b5348e951c56ee94ff7e7..9db1514d00a55e83dd6cf8e5474cd4857306e71c 100644 (file)
@@ -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,
index 304cf718d7b497e6fbfdf7c7211fccd49a5abda1..74014107c43145b1cb8cca7b14d6cb97b1d2ace1 100644 (file)
@@ -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,
index e6761f0f6db64604f5a775f09728569ef21377ee..afe5498d1e55502c007ee979e05e2133a44d798e 100644 (file)
@@ -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 */
index d47c3724ec266c5b247e88f93ce49cad949558d8..9abd13ebf4c203e38be78e30287927e90669ef91 100644 (file)
@@ -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,
index 2be6bd18423aa68c9c29e876b7a4d20ce09847a4..3ddb702b43f2e4d1bfef793739b3d38f54a72e8e 100644 (file)
@@ -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,
index ccdb599b331bae4b78d76d5fc055794c4f25fc19..48ba85a26853407ae00ee3c183a551083d106867 100644 (file)
@@ -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,