From 86f1b2c56640bc22126e7539aaff07ca13468177 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 11 Aug 2019 17:28:16 +0200 Subject: cleanup: zero-initialize gensquashfs options with memset Manual initialization is not only verbose, it actually caused a bug in a past version. Signed-off-by: David Oberhollenzer --- mkfs/options.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'mkfs') diff --git a/mkfs/options.c b/mkfs/options.c index 6fe5e55..99a7cee 100644 --- a/mkfs/options.c +++ b/mkfs/options.c @@ -143,19 +143,11 @@ void process_command_line(options_t *opt, int argc, char **argv) bool have_compressor; int i; + memset(opt, 0, sizeof(*opt)); opt->outmode = O_WRONLY | O_CREAT | O_EXCL; opt->compressor = compressor_get_default(); opt->blksz = SQFS_DEFAULT_BLOCK_SIZE; opt->devblksz = SQFS_DEVBLK_SIZE; - opt->dirscan_flags = 0; - opt->exportable = false; - opt->quiet = false; - opt->infile = NULL; - opt->packdir = NULL; - opt->outfile = NULL; - opt->selinux = NULL; - opt->comp_extra = NULL; - opt->fs_defaults = NULL; for (;;) { i = getopt_long(argc, argv, short_opts, long_opts, NULL); -- cgit v1.2.3