* [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
@ 2008-01-08 12:42 Jan Engelhardt
2008-01-08 16:28 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2008-01-08 12:42 UTC (permalink / raw)
To: kaber; +Cc: Netfilter Developer Mailing List
origin git://computergmbh.de/linux netfilter
commit 911b3c3680fd17409c64a6589cfcaf18e4fa04ce
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Tue Jan 8 13:25:08 2008 +0100
[NETFILTER]: Use const in struct xt_match, xt_target, xt_table
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index b99ede5..90dc6ea 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -214,7 +214,7 @@ struct xt_match
/* Free to use by each match */
unsigned long data;
- char *table;
+ const char *table;
unsigned int matchsize;
unsigned int compatsize;
unsigned int hooks;
@@ -261,7 +261,7 @@ struct xt_target
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;
- char *table;
+ const char *table;
unsigned int targetsize;
unsigned int compatsize;
unsigned int hooks;
@@ -277,7 +277,7 @@ struct xt_table
struct list_head list;
/* A unique name... */
- char name[XT_TABLE_MAXNAMELEN];
+ const char name[XT_TABLE_MAXNAMELEN];
/* What hooks you will enter on */
unsigned int valid_hooks;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
2008-01-08 12:42 [NETFILTER]: Use const in struct xt_match, xt_target, xt_table Jan Engelhardt
@ 2008-01-08 16:28 ` Patrick McHardy
2008-01-12 13:40 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2008-01-08 16:28 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> origin git://computergmbh.de/linux netfilter
> commit 911b3c3680fd17409c64a6589cfcaf18e4fa04ce
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Tue Jan 8 13:25:08 2008 +0100
>
> [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
This causes compiler warnings:
net/ipv6/netfilter/ip6_tables.c: In function 'ip6t_do_table':
net/ipv6/netfilter/ip6_tables.c:407: warning: passing argument 5 of
'trace_packet' discards qualifiers from pointer target type
net/ipv6/netfilter/ip6_tables.c:406: warning: passing argument 5 of
'trace_packet' discards qualifiers from pointer target type
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
2008-01-08 16:28 ` Patrick McHardy
@ 2008-01-12 13:40 ` Jan Engelhardt
2008-01-15 16:01 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2008-01-12 13:40 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Netfilter Developer Mailing List
On Jan 8 2008 17:28, Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> origin git://computergmbh.de/linux netfilter
>> commit 911b3c3680fd17409c64a6589cfcaf18e4fa04ce
>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>> Date: Tue Jan 8 13:25:08 2008 +0100
>>
>> [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
>
> This causes compiler warnings:
>
> net/ipv6/netfilter/ip6_tables.c: In function 'ip6t_do_table':
> net/ipv6/netfilter/ip6_tables.c:407: warning: passing argument 5 of
> 'trace_packet' discards qualifiers from pointer target type
> net/ipv6/netfilter/ip6_tables.c:406: warning: passing argument 5 of
> 'trace_packet' discards qualifiers from pointer target type
>
Please fold in this one:
commit 7084c6df091ebb6301e7e2782269784b416c98a6
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Sat Jan 12 14:39:54 2008 +0100
[NETFILTER]: Use const
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index f5b66ec..d688147 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -286,7 +286,7 @@ static void trace_packet(struct sk_buff *skb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
- char *tablename,
+ const char *tablename,
struct xt_table_info *private,
struct ipt_entry *e)
{
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 4ed16d2..e4b5418 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -316,7 +316,7 @@ static void trace_packet(struct sk_buff *skb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
- char *tablename,
+ const char *tablename,
struct xt_table_info *private,
struct ip6t_entry *e)
{
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
2008-01-12 13:40 ` Jan Engelhardt
@ 2008-01-15 16:01 ` Patrick McHardy
0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-01-15 16:01 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List
Jan Engelhardt wrote:
> On Jan 8 2008 17:28, Patrick McHardy wrote:
>> Jan Engelhardt wrote:
>>> origin git://computergmbh.de/linux netfilter
>>> commit 911b3c3680fd17409c64a6589cfcaf18e4fa04ce
>>> Author: Jan Engelhardt <jengelh@computergmbh.de>
>>> Date: Tue Jan 8 13:25:08 2008 +0100
>>>
>>> [NETFILTER]: Use const in struct xt_match, xt_target, xt_table
>> This causes compiler warnings:
>>
>> net/ipv6/netfilter/ip6_tables.c: In function 'ip6t_do_table':
>> net/ipv6/netfilter/ip6_tables.c:407: warning: passing argument 5 of
>> 'trace_packet' discards qualifiers from pointer target type
>> net/ipv6/netfilter/ip6_tables.c:406: warning: passing argument 5 of
>> 'trace_packet' discards qualifiers from pointer target type
>>
>
> Please fold in this one:
>
> commit 7084c6df091ebb6301e7e2782269784b416c98a6
> Author: Jan Engelhardt <jengelh@computergmbh.de>
> Date: Sat Jan 12 14:39:54 2008 +0100
>
> [NETFILTER]: Use const
>
> Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Done, compiles fine now. Thanks Jan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-15 16:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 12:42 [NETFILTER]: Use const in struct xt_match, xt_target, xt_table Jan Engelhardt
2008-01-08 16:28 ` Patrick McHardy
2008-01-12 13:40 ` Jan Engelhardt
2008-01-15 16:01 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).