* [PATCH][TRIVIAL] Unused variable in libipt_LOG.c and libip6t_LOG.c
@ 2003-08-04 0:15 Stephane Ouellette
2003-08-11 19:54 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Stephane Ouellette @ 2003-08-04 0:15 UTC (permalink / raw)
To: Harald Welte; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
Harald,
the following two patches remove an unused variable in save() and
convert all structure initialization to C99.
Regards,
Stephane Ouellette
[-- Attachment #2: libipt_LOG.c.patch --]
[-- Type: text/plain, Size: 2593 bytes --]
--- netfilter/userspace/extensions/libipt_LOG.c Mon Jul 14 16:01:29 2003
+++ netfilter.fixed/userspace/extensions/libipt_LOG.c Sun Aug 3 19:54:50 2003
@@ -26,12 +26,12 @@
}
static struct option opts[] = {
- { "log-level", 1, 0, '!' },
- { "log-prefix", 1, 0, '#' },
- { "log-tcp-sequence", 0, 0, '1' },
- { "log-tcp-options", 0, 0, '2' },
- { "log-ip-options", 0, 0, '3' },
- { 0 }
+ { .name = "log-level", .has_arg = 1, .flag = 0, .val = '!' },
+ { .name = "log-prefix", .has_arg = 1, .flag = 0, .val = '#' },
+ { .name = "log-tcp-sequence", .has_arg = 0, .flag = 0, .val = '1' },
+ { .name = "log-tcp-options", .has_arg = 0, .flag = 0, .val = '2' },
+ { .name = "log-ip-options", .has_arg = 0, .flag = 0, .val = '3' },
+ { .name = 0 }
};
/* Initialize the target. */
@@ -52,15 +52,15 @@
};
static struct ipt_log_names ipt_log_names[]
-= { { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "error", LOG_ERR }, /* DEPRECATED */
- { "info", LOG_INFO },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* DEPRECATED */
- { "warning", LOG_WARNING }
+= { { .name = "alert", .level = LOG_ALERT },
+ { .name = "crit", .level = LOG_CRIT },
+ { .name = "debug", .level = LOG_DEBUG },
+ { .name = "emerg", .level = LOG_EMERG },
+ { .name = "error", .level = LOG_ERR }, /* DEPRECATED */
+ { .name = "info", .level = LOG_INFO },
+ { .name = "notice", .level = LOG_NOTICE },
+ { .name = "panic", .level = LOG_EMERG }, /* DEPRECATED */
+ { .name = "warning", .level = LOG_WARNING }
};
static u_int8_t
@@ -225,7 +225,6 @@
{
const struct ipt_log_info *loginfo
= (const struct ipt_log_info *)target->data;
- unsigned int i = 0;
if (strcmp(loginfo->prefix, "") != 0)
printf("--log-prefix \"%s\" ", loginfo->prefix);
@@ -243,18 +242,18 @@
static
struct iptables_target log
-= { NULL,
- "LOG",
- IPTABLES_VERSION,
- IPT_ALIGN(sizeof(struct ipt_log_info)),
- IPT_ALIGN(sizeof(struct ipt_log_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+= {
+ .name = "LOG",
+ .version = IPTABLES_VERSION,
+ .size = IPT_ALIGN(sizeof(struct ipt_log_info)),
+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_log_info)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)
[-- Attachment #3: libip6t_LOG.c.patch --]
[-- Type: text/plain, Size: 2608 bytes --]
--- netfilter/userspace/extensions/libip6t_LOG.c Mon Jul 14 16:01:29 2003
+++ netfilter.fixed/userspace/extensions/libip6t_LOG.c Sun Aug 3 20:02:57 2003
@@ -26,12 +26,12 @@
}
static struct option opts[] = {
- { "log-level", 1, 0, '!' },
- { "log-prefix", 1, 0, '#' },
- { "log-tcp-sequence", 0, 0, '1' },
- { "log-tcp-options", 0, 0, '2' },
- { "log-ip-options", 0, 0, '3' },
- { 0 }
+ { .name = "log-level", .has_arg = 1, .flag = 0, .val = '!' },
+ { .name = "log-prefix", .has_arg = 1, .flag = 0, .val = '#' },
+ { .name = "log-tcp-sequence", .has_arg = 0, .flag = 0, .val = '1' },
+ { .name = "log-tcp-options", .has_arg = 0, .flag = 0, .val = '2' },
+ { .name = "log-ip-options", .has_arg = 0, .flag = 0, .val = '3' },
+ { .name = 0 }
};
/* Initialize the target. */
@@ -52,15 +52,15 @@
};
static struct ip6t_log_names ip6t_log_names[]
-= { { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "error", LOG_ERR }, /* DEPRECATED */
- { "info", LOG_INFO },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* DEPRECATED */
- { "warning", LOG_WARNING }
+= { { .name = "alert", .level = LOG_ALERT },
+ { .name = "crit", .level = LOG_CRIT },
+ { .name = "debug", .level = LOG_DEBUG },
+ { .name = "emerg", .level = LOG_EMERG },
+ { .name = "error", .level = LOG_ERR }, /* DEPRECATED */
+ { .name = "info", .level = LOG_INFO },
+ { .name = "notice", .level = LOG_NOTICE },
+ { .name = "panic", .level = LOG_EMERG }, /* DEPRECATED */
+ { .name = "warning", .level = LOG_WARNING }
};
static u_int8_t
@@ -225,7 +225,6 @@
{
const struct ip6t_log_info *loginfo
= (const struct ip6t_log_info *)target->data;
- unsigned int i = 0;
if (strcmp(loginfo->prefix, "") != 0)
printf("--log-prefix \"%s\" ", loginfo->prefix);
@@ -243,18 +242,18 @@
static
struct ip6tables_target log
-= { NULL,
- "LOG",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_log_info)),
- IP6T_ALIGN(sizeof(struct ip6t_log_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+= {
+ .name = "LOG",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH][TRIVIAL] Unused variable in libipt_LOG.c and libip6t_LOG.c
@ 2003-08-11 13:42 Stephane Ouellette
0 siblings, 0 replies; 3+ messages in thread
From: Stephane Ouellette @ 2003-08-11 13:42 UTC (permalink / raw)
To: Harald Welte; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 145 bytes --]
Harald,
the following two patches remove an unused variable in save() and
convert all structure initializations to C99.
Stephane Ouellette
[-- Attachment #2: libip6t_LOG.c.patch --]
[-- Type: text/plain, Size: 2608 bytes --]
--- netfilter/userspace/extensions/libip6t_LOG.c Mon Jul 14 16:01:29 2003
+++ netfilter.fixed/userspace/extensions/libip6t_LOG.c Sun Aug 3 20:02:57 2003
@@ -26,12 +26,12 @@
}
static struct option opts[] = {
- { "log-level", 1, 0, '!' },
- { "log-prefix", 1, 0, '#' },
- { "log-tcp-sequence", 0, 0, '1' },
- { "log-tcp-options", 0, 0, '2' },
- { "log-ip-options", 0, 0, '3' },
- { 0 }
+ { .name = "log-level", .has_arg = 1, .flag = 0, .val = '!' },
+ { .name = "log-prefix", .has_arg = 1, .flag = 0, .val = '#' },
+ { .name = "log-tcp-sequence", .has_arg = 0, .flag = 0, .val = '1' },
+ { .name = "log-tcp-options", .has_arg = 0, .flag = 0, .val = '2' },
+ { .name = "log-ip-options", .has_arg = 0, .flag = 0, .val = '3' },
+ { .name = 0 }
};
/* Initialize the target. */
@@ -52,15 +52,15 @@
};
static struct ip6t_log_names ip6t_log_names[]
-= { { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "error", LOG_ERR }, /* DEPRECATED */
- { "info", LOG_INFO },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* DEPRECATED */
- { "warning", LOG_WARNING }
+= { { .name = "alert", .level = LOG_ALERT },
+ { .name = "crit", .level = LOG_CRIT },
+ { .name = "debug", .level = LOG_DEBUG },
+ { .name = "emerg", .level = LOG_EMERG },
+ { .name = "error", .level = LOG_ERR }, /* DEPRECATED */
+ { .name = "info", .level = LOG_INFO },
+ { .name = "notice", .level = LOG_NOTICE },
+ { .name = "panic", .level = LOG_EMERG }, /* DEPRECATED */
+ { .name = "warning", .level = LOG_WARNING }
};
static u_int8_t
@@ -225,7 +225,6 @@
{
const struct ip6t_log_info *loginfo
= (const struct ip6t_log_info *)target->data;
- unsigned int i = 0;
if (strcmp(loginfo->prefix, "") != 0)
printf("--log-prefix \"%s\" ", loginfo->prefix);
@@ -243,18 +242,18 @@
static
struct ip6tables_target log
-= { NULL,
- "LOG",
- IPTABLES_VERSION,
- IP6T_ALIGN(sizeof(struct ip6t_log_info)),
- IP6T_ALIGN(sizeof(struct ip6t_log_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+= {
+ .name = "LOG",
+ .version = IPTABLES_VERSION,
+ .size = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_log_info)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)
[-- Attachment #3: libipt_LOG.c.patch --]
[-- Type: text/plain, Size: 2593 bytes --]
--- netfilter/userspace/extensions/libipt_LOG.c Mon Jul 14 16:01:29 2003
+++ netfilter.fixed/userspace/extensions/libipt_LOG.c Sun Aug 3 19:54:50 2003
@@ -26,12 +26,12 @@
}
static struct option opts[] = {
- { "log-level", 1, 0, '!' },
- { "log-prefix", 1, 0, '#' },
- { "log-tcp-sequence", 0, 0, '1' },
- { "log-tcp-options", 0, 0, '2' },
- { "log-ip-options", 0, 0, '3' },
- { 0 }
+ { .name = "log-level", .has_arg = 1, .flag = 0, .val = '!' },
+ { .name = "log-prefix", .has_arg = 1, .flag = 0, .val = '#' },
+ { .name = "log-tcp-sequence", .has_arg = 0, .flag = 0, .val = '1' },
+ { .name = "log-tcp-options", .has_arg = 0, .flag = 0, .val = '2' },
+ { .name = "log-ip-options", .has_arg = 0, .flag = 0, .val = '3' },
+ { .name = 0 }
};
/* Initialize the target. */
@@ -52,15 +52,15 @@
};
static struct ipt_log_names ipt_log_names[]
-= { { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "error", LOG_ERR }, /* DEPRECATED */
- { "info", LOG_INFO },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* DEPRECATED */
- { "warning", LOG_WARNING }
+= { { .name = "alert", .level = LOG_ALERT },
+ { .name = "crit", .level = LOG_CRIT },
+ { .name = "debug", .level = LOG_DEBUG },
+ { .name = "emerg", .level = LOG_EMERG },
+ { .name = "error", .level = LOG_ERR }, /* DEPRECATED */
+ { .name = "info", .level = LOG_INFO },
+ { .name = "notice", .level = LOG_NOTICE },
+ { .name = "panic", .level = LOG_EMERG }, /* DEPRECATED */
+ { .name = "warning", .level = LOG_WARNING }
};
static u_int8_t
@@ -225,7 +225,6 @@
{
const struct ipt_log_info *loginfo
= (const struct ipt_log_info *)target->data;
- unsigned int i = 0;
if (strcmp(loginfo->prefix, "") != 0)
printf("--log-prefix \"%s\" ", loginfo->prefix);
@@ -243,18 +242,18 @@
static
struct iptables_target log
-= { NULL,
- "LOG",
- IPTABLES_VERSION,
- IPT_ALIGN(sizeof(struct ipt_log_info)),
- IPT_ALIGN(sizeof(struct ipt_log_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+= {
+ .name = "LOG",
+ .version = IPTABLES_VERSION,
+ .size = IPT_ALIGN(sizeof(struct ipt_log_info)),
+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_log_info)),
+ .help = &help,
+ .init = &init,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][TRIVIAL] Unused variable in libipt_LOG.c and libip6t_LOG.c
2003-08-04 0:15 [PATCH][TRIVIAL] Unused variable in libipt_LOG.c and libip6t_LOG.c Stephane Ouellette
@ 2003-08-11 19:54 ` Harald Welte
0 siblings, 0 replies; 3+ messages in thread
From: Harald Welte @ 2003-08-11 19:54 UTC (permalink / raw)
To: Stephane Ouellette; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
On Sun, Aug 03, 2003 at 08:15:52PM -0400, Stephane Ouellette wrote:
> Harald,
>
> the following two patches remove an unused variable in save() and
> convert all structure initialization to C99.
thanks, applied.
> Regards,
> Stephane Ouellette
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-11 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-04 0:15 [PATCH][TRIVIAL] Unused variable in libipt_LOG.c and libip6t_LOG.c Stephane Ouellette
2003-08-11 19:54 ` Harald Welte
-- strict thread matches above, loose matches on Subject: below --
2003-08-11 13:42 Stephane Ouellette
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.