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/xtables-eb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'iptables/xtables-eb.c') 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."); -- cgit v1.2.3