X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fextract.c;h=ac50fa8fb87c27e5e8a19eb6c8920515b185d22d;hb=3872f9e0d30f6439b2a08e091fbd3df042841b6a;hp=b0df25d0719245c3dbab0d3580ea524019a607cb;hpb=29ac4319aa9c75811cd5629cd3471a681fbeb552;p=wimlib diff --git a/src/extract.c b/src/extract.c index b0df25d0..ac50fa8f 100644 --- a/src/extract.c +++ b/src/extract.c @@ -40,6 +40,7 @@ #endif #include "wimlib/apply.h" +#include "wimlib/assert.h" #include "wimlib/dentry.h" #include "wimlib/encoding.h" #include "wimlib/endianness.h" @@ -1008,7 +1009,7 @@ dentry_list_resolve_streams(struct list_head *dentry_list, } static int -ref_stream(struct wim_lookup_table_entry *lte, u32 stream_idx, +ref_stream(struct wim_lookup_table_entry *lte, unsigned stream_idx, struct wim_dentry *dentry, struct apply_ctx *ctx) { struct wim_inode *inode = dentry->d_inode; @@ -1083,7 +1084,7 @@ ref_unnamed_stream(struct wim_dentry *dentry, struct apply_ctx *ctx) { struct wim_inode *inode = dentry->d_inode; int ret; - u16 stream_idx; + unsigned stream_idx; struct wim_lookup_table_entry *stream; if (unlikely(inode_is_encrypted_directory(inode))) @@ -1120,8 +1121,8 @@ dentry_ref_streams(struct wim_dentry *dentry, struct apply_ctx *ctx) * extraction mode and volume, and to avoid complications, if not doing * a linked extraction. */ if (ctx->supported_features.named_data_streams) { - for (u16 i = 0; i < inode->i_num_ads; i++) { - if (!ads_entry_is_named_stream(&inode->i_ads_entries[i])) + for (unsigned i = 0; i < inode->i_num_ads; i++) { + if (!inode->i_ads_entries[i].stream_name_nbytes) continue; ret = ref_stream(inode->i_ads_entries[i].lte, i + 1, dentry, ctx); @@ -2017,7 +2018,7 @@ wimlib_extract_image_from_pipe_with_progress(int pipe_fd, if (i == image) { /* Metadata resource is for the image being extracted. * Parse it and save the metadata in memory. */ - ret = read_metadata_resource(pwm, imd); + ret = read_metadata_resource(imd); if (ret) goto out_wimlib_free; imd->modified = 1;