]> wimlib.net Git - wimlib/blobdiff - src/write.c
Clean up setting of compression type
[wimlib] / src / write.c
index 6be215e3e76570bd38aa12fc28afec740911f92f..30b063e5c3507f55af602367ba5111a35795fba3 100644 (file)
@@ -1834,11 +1834,10 @@ blob_size_table_insert(struct blob_descriptor *blob, void *_tab)
        struct blob_size_table *tab = _tab;
        size_t pos;
        struct blob_descriptor *same_size_blob;
-       struct hlist_node *tmp;
 
        pos = hash_u64(blob->size) % tab->capacity;
        blob->unique_size = 1;
-       hlist_for_each_entry(same_size_blob, tmp, &tab->array[pos], hash_list_2) {
+       hlist_for_each_entry(same_size_blob, &tab->array[pos], hash_list_2) {
                if (same_size_blob->size == blob->size) {
                        blob->unique_size = 0;
                        same_size_blob->unique_size = 0;
@@ -2881,13 +2880,8 @@ write_wim_part(WIMStruct *wim,
        wim->hdr.part_number = part_number;
        wim->hdr.total_parts = total_parts;
 
-       /* Set compression type if different.  */
-       if (wim->compression_type != wim->out_compression_type) {
-               ret = set_wim_hdr_cflags(wim->out_compression_type, &wim->hdr);
-               wimlib_assert(ret == 0);
-       }
-
-       /* Set chunk size if different.  */
+       /* Set the compression type and chunk size.  */
+       set_wim_hdr_cflags(wim->out_compression_type, &wim->hdr);
        wim->hdr.chunk_size = wim->out_chunk_size;
 
        /* Set GUID.  */