diff options
author | Phil Sutter <phil@nwl.cc> | 2018-07-19 18:31:54 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-07-19 22:15:12 +0200 |
commit | 87b5b9e2240e7cd5487d160cc3e059c61622ce75 (patch) | |
tree | 490686a1485eed2d1a9b3a055a797f1983f97794 /iptables/iptables-restore.c | |
parent | 907da5c505b219537586f7c2bdb7320c4f97386f (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.c | 5 |
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", |