Thread (36 messages) 36 messages, 5 authors, 2012-08-31

Re: [PATCH 06/18] netfilter: add protocol independant NAT core

From: Jan Engelhardt <hidden>
Date: 2012-08-22 22:48:19
Also in: netfilter-devel

On Thursday 2012-08-23 00:13, Patrick McHardy wrote:
quoted
quoted
+	iph = (void *)skb->data + iphdroff;
Is trying to avoid some GNU extensions a worthwhile goal? If so,
iph = (struct iphdr *)(skb->data + iphdroff) should be used, like in:
I don't get your point.
You are doing arithmetic with a void* pointer, which is a GNU extension.
Should we try to limit "unnecessary excess usage" of GNU features?
You could do arithmetic with the char* that skb->data is:

 iph = (void *)(skb->data + iphdroff);

or, if more clarity is desired, the more verbose form

 iph = (struct iphdr *)(skb->data + iphdroff);

Does this seem like something worthwhile to passively pursue?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help