summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-23 17:43:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-08-24 10:05:51 +0200
commit2c4e4d2a7432d483ac5599a15b36d1dc1edf72df (patch)
treed2954f4faf33739f82ee935182ebd78e3e0701a7
parent9f5b28acf21a0bd413c3295d951e25d5988b8844 (diff)
ebtables: trivial: Leverage C99-style initializers a bit more
This nit was discovered when comparing do_commandeb() with do_commandeb_xlate(): Since 'cs' is initialized upon declaration already, initialization of field '.eb.bitmask' may be moved there as well. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--iptables/xtables-eb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 534714de..68f12500 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -769,6 +769,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table,
struct xtables_match *m;
struct iptables_command_state cs = {
.argv = argv,
+ .eb.bitmask = EBT_NOPROTO,
};
char command = 'h';
const char *chain = NULL;
@@ -790,7 +791,6 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table,
/* prevent getopt to spoil our error reporting */
optind = 0;
opterr = false;
- cs.eb.bitmask = EBT_NOPROTO;
/* Getopt saves the day */
while ((c = getopt_long(argc, argv,