diff options
Diffstat (limited to 'iptables/iptables.c')
-rw-r--r-- | iptables/iptables.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/iptables/iptables.c b/iptables/iptables.c index 08ea7afa..428fae4e 100644 --- a/iptables/iptables.c +++ b/iptables/iptables.c @@ -1345,7 +1345,10 @@ static void command_match(struct iptables_command_state *cs) int do_command4(int argc, char *argv[], char **table, struct xtc_handle **handle, bool restore) { - struct iptables_command_state cs; + struct iptables_command_state cs = { + .jumpto = "", + .argv = argv, + }; struct ipt_entry *e = NULL; unsigned int nsaddrs = 0, ndaddrs = 0; struct in_addr *saddrs = NULL, *smasks = NULL; @@ -1367,10 +1370,6 @@ int do_command4(int argc, char *argv[], char **table, struct xtables_target *t; unsigned long long cnt; - memset(&cs, 0, sizeof(cs)); - cs.jumpto = ""; - cs.argv = argv; - /* re-set optind to 0 in case do_command4 gets called * a second time */ optind = 0; |