xz: Use lzma_lzma_preset() to initialize the options structure.
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 4 Sep 2010 20:12:20 +0000 (23:12 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 4 Sep 2010 20:12:20 +0000 (23:12 +0300)
src/xz/options.c

index 7186f24..710de3b 100644 (file)
@@ -346,18 +346,8 @@ options_lzma(const char *str)
        };
 
        lzma_options_lzma *options = xmalloc(sizeof(lzma_options_lzma));
-       *options = (lzma_options_lzma){
-               .dict_size = LZMA_DICT_SIZE_DEFAULT,
-               .preset_dict =  NULL,
-               .preset_dict_size = 0,
-               .lc = LZMA_LC_DEFAULT,
-               .lp = LZMA_LP_DEFAULT,
-               .pb = LZMA_PB_DEFAULT,
-               .mode = LZMA_MODE_NORMAL,
-               .nice_len = 64,
-               .mf = LZMA_MF_BT4,
-               .depth = 0,
-       };
+       if (lzma_lzma_preset(options, LZMA_PRESET_DEFAULT))
+               message_bug();
 
        parse_options(str, opts, &set_lzma, options);