netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] uncast some ip_conntrack_get callsites
@ 2006-12-28 17:22 Jan Engelhardt
  2007-01-09 11:21 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2006-12-28 17:22 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List


ip_conntrack_get already takes a const struct sk_buff *, so no need to 
cast the const away.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>

Index: linux-2.6.20-rc2/net/netfilter/xt_conntrack.c
===================================================================
--- linux-2.6.20-rc2.orig/net/netfilter/xt_conntrack.c
+++ linux-2.6.20-rc2/net/netfilter/xt_conntrack.c
@@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
 	enum ip_conntrack_info ctinfo;
 	unsigned int statebit;
 
-	ct = ip_conntrack_get((struct sk_buff *)skb, &ctinfo);
+	ct = ip_conntrack_get(skb, &ctinfo);
 
 #define FWINV(bool, invflg) ((bool) ^ !!(sinfo->invflags & invflg))
 
Index: linux-2.6.20-rc2/net/netfilter/xt_helper.c
===================================================================
--- linux-2.6.20-rc2.orig/net/netfilter/xt_helper.c
+++ linux-2.6.20-rc2/net/netfilter/xt_helper.c
@@ -54,7 +54,7 @@ match(const struct sk_buff *skb,
 	enum ip_conntrack_info ctinfo;
 	int ret = info->invert;
 	
-	ct = ip_conntrack_get((struct sk_buff *)skb, &ctinfo);
+	ct = ip_conntrack_get(skb, &ctinfo);
 	if (!ct) {
 		DEBUGP("xt_helper: Eek! invalid conntrack?\n");
 		return ret;
#<EOF>

	-`J'
-- 

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

* Re: [PATCH] uncast some ip_conntrack_get callsites
  2006-12-28 17:22 [PATCH] uncast some ip_conntrack_get callsites Jan Engelhardt
@ 2007-01-09 11:21 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2007-01-09 11:21 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

Jan Engelhardt wrote:
> ip_conntrack_get already takes a const struct sk_buff *, so no need to 
> cast the const away.


While the patch is obvious and small, I won't apply any cleanup patches
for ip_conntrack anymore since its scheduled for removal in 2.6.22.
Please put all your energy in nf_conntrack :)

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

end of thread, other threads:[~2007-01-09 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-28 17:22 [PATCH] uncast some ip_conntrack_get callsites Jan Engelhardt
2007-01-09 11:21 ` 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).