summaryrefslogtreecommitdiffstats
path: root/iptables/iptables-restore.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-07-19 18:31:54 +0200
committerFlorian Westphal <fw@strlen.de>2018-07-19 22:15:12 +0200
commit87b5b9e2240e7cd5487d160cc3e059c61622ce75 (patch)
tree490686a1485eed2d1a9b3a055a797f1983f97794 /iptables/iptables-restore.c
parent907da5c505b219537586f7c2bdb7320c4f97386f (diff)
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 <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/iptables-restore.c')
-rw-r--r--iptables/iptables-restore.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 39198752..d5603fce 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -391,7 +391,7 @@ iptables_restore_main(int argc, char *argv[])
}
if (strcmp(policy, "-") != 0) {
- struct xt_counters count;
+ struct xt_counters count = {};
if (counters) {
char *ctrs;
@@ -401,9 +401,6 @@ iptables_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",