Skip to contentSkip to conversation

netfilter: nf_conntrack: remove exceptional & on function name

PATCH Applied Himangi Saraogi 2 participants 2 messages Jul 24, 2014 – Jul 25, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: nf_conntrack: remove exceptional & on function name

In this file, function names are otherwise used as pointers without &.

A simplified version of the Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

---
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +1 -1
index 8127dc8..41744cd 100644
@@ -358,7 +358,7 @@ static struct nf_sockopt_ops so_getorigdst = {
 	.pf		= PF_INET,
 	.get_optmin	= SO_ORIGINAL_DST,
 	.get_optmax	= SO_ORIGINAL_DST+1,
-	.get		= &getorigdst,
+	.get		= getorigdst,
 	.owner		= THIS_MODULE,
 };
 
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 12 lines · Himangi Saraogi

In this file, function names are otherwise used as pointers without &.

A simplified version of the Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

Quoted 7 lines

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

Applied, thanks Himangi.