]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/netfilter/xt_limit.c
[NETFILTER]: add some consts, remove some casts
[mirror_ubuntu-artful-kernel.git] / net / netfilter / xt_limit.c
index 2717aa65246a77888502e51133fb22d303546719..b042419462af77a1da0d964789e182e03591734b 100644 (file)
@@ -67,7 +67,8 @@ ipt_limit_match(const struct sk_buff *skb,
                unsigned int protoff,
                bool *hotdrop)
 {
-       struct xt_rateinfo *r = ((struct xt_rateinfo *)matchinfo)->master;
+       struct xt_rateinfo *r =
+               ((const struct xt_rateinfo *)matchinfo)->master;
        unsigned long now = jiffies;
 
        spin_lock_bh(&limit_lock);
@@ -144,7 +145,7 @@ struct compat_xt_rateinfo {
  * master pointer, which does not need to be preserved. */
 static void compat_from_user(void *dst, void *src)
 {
-       struct compat_xt_rateinfo *cm = src;
+       const struct compat_xt_rateinfo *cm = src;
        struct xt_rateinfo m = {
                .avg            = cm->avg,
                .burst          = cm->burst,
@@ -158,7 +159,7 @@ static void compat_from_user(void *dst, void *src)
 
 static int compat_to_user(void __user *dst, void *src)
 {
-       struct xt_rateinfo *m = src;
+       const struct xt_rateinfo *m = src;
        struct compat_xt_rateinfo cm = {
                .avg            = m->avg,
                .burst          = m->burst,