summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_quota.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@gmx.de>2007-07-07 22:16:55 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-10 22:17:01 -0700
commita47362a226456d8db8207e618324a2278d05d3a7 (patch)
tree9431e971844582fd65a8cdd234cf89d72c6e4c6c /net/netfilter/xt_quota.c
parente1931b784a8de324abf310fa3b5e3f25d3988233 (diff)
[NETFILTER]: add some consts, remove some casts
Make a number of variables const and/or remove unneeded casts. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_quota.c')
-rw-r--r--net/netfilter/xt_quota.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c
index e13d62a8caba..feb130d14f2c 100644
--- a/net/netfilter/xt_quota.c
+++ b/net/netfilter/xt_quota.c
@@ -22,7 +22,8 @@ match(const struct sk_buff *skb,
const struct xt_match *match, const void *matchinfo,
int offset, unsigned int protoff, bool *hotdrop)
{
- struct xt_quota_info *q = ((struct xt_quota_info *)matchinfo)->master;
+ struct xt_quota_info *q =
+ ((const struct xt_quota_info *)matchinfo)->master;
bool ret = q->flags & XT_QUOTA_INVERT;
spin_lock_bh(&quota_lock);
@@ -43,7 +44,7 @@ checkentry(const char *tablename, const void *entry,
const struct xt_match *match, void *matchinfo,
unsigned int hook_mask)
{
- struct xt_quota_info *q = (struct xt_quota_info *)matchinfo;
+ struct xt_quota_info *q = matchinfo;
if (q->flags & ~XT_QUOTA_MASK)
return false;