]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
netfilter: xtables: Remove unused variable in compat_copy_entry_from_user()
authorTaehee Yoo <ap420073@gmail.com>
Sat, 29 Jul 2017 11:31:00 +0000 (20:31 +0900)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 2 Aug 2017 12:25:50 +0000 (14:25 +0200)
The target variable is not used in the compat_copy_entry_from_user().
So It can be removed.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c

index 0bc3c3d73e61e00a04d73f32800256a62c8943a5..cf520d30cb94bc6aa9d1d33e08f75149300f232d 100644 (file)
@@ -1117,7 +1117,6 @@ compat_copy_entry_from_user(struct compat_arpt_entry *e, void **dstptr,
                            struct xt_table_info *newinfo, unsigned char *base)
 {
        struct xt_entry_target *t;
-       struct xt_target *target;
        struct arpt_entry *de;
        unsigned int origsize;
        int h;
@@ -1132,7 +1131,6 @@ compat_copy_entry_from_user(struct compat_arpt_entry *e, void **dstptr,
 
        de->target_offset = e->target_offset - (origsize - *size);
        t = compat_arpt_get_target(e);
-       target = t->u.kernel.target;
        xt_compat_target_from_user(t, dstptr, size);
 
        de->next_offset = e->next_offset - (origsize - *size);
index 2a55a40211cbfb94a9ade41c33678bba4be2a7e4..f47e8dad5e9559a531a225064265f79c1743f22a 100644 (file)
@@ -1355,7 +1355,6 @@ compat_copy_entry_from_user(struct compat_ipt_entry *e, void **dstptr,
                            struct xt_table_info *newinfo, unsigned char *base)
 {
        struct xt_entry_target *t;
-       struct xt_target *target;
        struct ipt_entry *de;
        unsigned int origsize;
        int h;
@@ -1374,7 +1373,6 @@ compat_copy_entry_from_user(struct compat_ipt_entry *e, void **dstptr,
 
        de->target_offset = e->target_offset - (origsize - *size);
        t = compat_ipt_get_target(e);
-       target = t->u.kernel.target;
        xt_compat_target_from_user(t, dstptr, size);
 
        de->next_offset = e->next_offset - (origsize - *size);