summaryrefslogtreecommitdiffstats
path: root/iptables/ip6tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/ip6tables.c')
-rw-r--r--iptables/ip6tables.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index 2cb115f5..3bd1e5fa 100644
--- a/iptables/ip6tables.c
+++ b/iptables/ip6tables.c
@@ -1351,7 +1351,10 @@ static void command_match(struct iptables_command_state *cs)
int do_command6(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 ip6t_entry *e = NULL;
unsigned int nsaddrs = 0, ndaddrs = 0;
struct in6_addr *saddrs = NULL, *daddrs = NULL;
@@ -1374,10 +1377,6 @@ int do_command6(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_command6 gets called
* a second time */
optind = 0;