From 87b5b9e2240e7cd5487d160cc3e059c61622ce75 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:31:54 +0200 Subject: iptables: replace memset by c99-style initializers This cleans up a few obvious cases identified by grepping the source code for 'memset'. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/ip6tables-restore.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'iptables/ip6tables-restore.c') diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c index ceffa616..cc50bb4f 100644 --- a/iptables/ip6tables-restore.c +++ b/iptables/ip6tables-restore.c @@ -393,7 +393,7 @@ int ip6tables_restore_main(int argc, char *argv[]) } if (strcmp(policy, "-") != 0) { - struct xt_counters count; + struct xt_counters count = {}; if (counters) { char *ctrs; @@ -403,9 +403,6 @@ int ip6tables_restore_main(int argc, char *argv[]) xtables_error(PARAMETER_PROBLEM, "invalid policy counters " "for chain '%s'\n", chain); - - } else { - memset(&count, 0, sizeof(count)); } DEBUGP("Setting policy of chain %s to %s\n", -- cgit v1.2.3