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/xtables-eb.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/xtables-eb.c')
-rw-r--r-- | iptables/xtables-eb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 2f27656d..f4b39095 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -744,7 +744,9 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table) unsigned int flags = 0; struct xtables_target *t, *w; struct xtables_match *m; - struct iptables_command_state cs; + struct iptables_command_state cs = { + .argv = argv, + }; char command = 'h'; const char *chain = NULL; const char *policy = NULL; @@ -752,9 +754,6 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table) struct xtables_rule_match *xtrm_i; struct ebt_match *match; - memset(&cs, 0, sizeof(cs)); - cs.argv = argv; - if (nft_init(h, xtables_bridge) < 0) xtables_error(OTHER_PROBLEM, "Could not initialize nftables layer."); |