aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2008-01-31 04:51:45 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-31 19:28:10 -0800
commit02e23f4057fa86d6ecdbd83b5116c3c0e4c76fac (patch)
tree8fa9b5c0a8781700bbc8955bbab5d9010dc2c4a3 /net
parent9ddd0ed050445176a97e11b2b24d6fbc01843da6 (diff)
[NETFILTER]: nf_conntrack_sane: annotate SANE helper with const
Annotate nf_conntrack_sane variables with const qualifier and remove a few casts. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_sane.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_sane.c b/net/netfilter/nf_conntrack_sane.c
index b5a16c6e21c..a70051d741a 100644
--- a/net/netfilter/nf_conntrack_sane.c
+++ b/net/netfilter/nf_conntrack_sane.c
@@ -62,8 +62,9 @@ static int help(struct sk_buff *skb,
enum ip_conntrack_info ctinfo)
{
unsigned int dataoff, datalen;
- struct tcphdr _tcph, *th;
- char *sb_ptr;
+ const struct tcphdr *th;
+ struct tcphdr _tcph;
+ void *sb_ptr;
int ret = NF_ACCEPT;
int dir = CTINFO2DIR(ctinfo);
struct nf_ct_sane_master *ct_sane_info;
@@ -99,7 +100,7 @@ static int help(struct sk_buff *skb,
if (datalen != sizeof(struct sane_request))
goto out;
- req = (struct sane_request *)sb_ptr;
+ req = sb_ptr;
if (req->RPC_code != htonl(SANE_NET_START)) {
/* Not an interesting command */
ct_sane_info->state = SANE_STATE_NORMAL;
@@ -123,7 +124,7 @@ static int help(struct sk_buff *skb,
goto out;
}
- reply = (struct sane_reply_net_start *)sb_ptr;
+ reply = sb_ptr;
if (reply->status != htonl(SANE_STATUS_SUCCESS)) {
/* saned refused the command */
pr_debug("nf_ct_sane: unsuccessful SANE_STATUS = %u\n",