summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-11 17:28:16 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-08-11 17:28:16 +0200
commit86f1b2c56640bc22126e7539aaff07ca13468177 (patch)
tree7bd4464c284263ae0481db9a4381ea2fbcdb50c8 /mkfs
parentc472d86a770e896339b1ac200ca913676bf38526 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/options.c10
1 files changed, 1 insertions, 9 deletions
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);