[NETFILTER]: ip_tables: kill useless wrapper
[powerpc.git] / net / ipv4 / netfilter / ip_tables.c
index 87d3692..a8f1a2a 100644 (file)
@@ -1323,8 +1323,6 @@ do_replace(void __user *user, unsigned int len)
                return -ENOPROTOOPT;
 
        /* overflow check */
-       if (tmp.size >= INT_MAX / num_possible_cpus())
-               return -ENOMEM;
        if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters))
                return -ENOMEM;
 
@@ -1481,12 +1479,6 @@ struct compat_ipt_replace {
        struct compat_ipt_entry entries[0];
 };
 
-static inline int compat_copy_match_to_user(struct ipt_entry_match *m,
-               void __user **dstptr, compat_uint_t *size)
-{
-       return xt_compat_match_to_user(m, dstptr, size);
-}
-
 static int
 compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr,
                          compat_uint_t *size, struct xt_counters *counters,
@@ -1508,7 +1500,7 @@ compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr,
                goto out;
 
        *dstptr += sizeof(struct compat_ipt_entry);
-       ret = IPT_MATCH_ITERATE(e, compat_copy_match_to_user, dstptr, size);
+       ret = IPT_MATCH_ITERATE(e, xt_compat_match_to_user, dstptr, size);
        target_offset = e->target_offset - (origsize - *size);
        if (ret)
                goto out;