Linux Netfilter discussions
 help / color / mirror / Atom feed
* [PATCH] ip_tables.h: Add the const qualifier.
@ 2011-09-28  7:32 Il Han
  2011-09-28 12:16 ` Jan Engelhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Il Han @ 2011-09-28  7:32 UTC (permalink / raw)
  To: David S. Miller, Rusty Russell, James Morris, Harald Welte,
	Jozsef Kadlecsik
  Cc: netfilter-devel, netfilter, coreteam, Il Han

We need to add the const qualifier before the struct specifier,
because its value will not be changed.
Then, the following warning would be removed.

net/ipv4/netfilter/ip_tables.c:183: warning: passing argument 1 of 'ipt_get_target' discards qualifiers from pointer target type

Add it.

Signed-off-by: Il Han <corone.il.han@gmail.com>
---
 include/linux/netfilter_ipv4/ip_tables.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 64a5d95..6e319f4 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -224,7 +224,7 @@ struct ipt_get_entries {
 
 /* Helper functions */
 static __inline__ struct xt_entry_target *
-ipt_get_target(struct ipt_entry *e)
+ipt_get_target(const struct ipt_entry *e)
 {
 	return (void *)e + e->target_offset;
 }
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-28 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28  7:32 [PATCH] ip_tables.h: Add the const qualifier Il Han
2011-09-28 12:16 ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox