]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.h
Fix a couple random issues
[wimlib] / src / lookup_table.h
index 3a653bfb531b15c13a437ac2a647c378c0e71a75..f0ee25b78f2d89761352afaa4860a39e1f783312 100644 (file)
@@ -27,13 +27,11 @@ struct lookup_table {
 struct wimlib_fd;
 
 #ifdef WITH_NTFS_3G
-typedef struct _ntfs_attr ntfs_attr;
-typedef struct _ntfs_volume ntfs_volume;
 struct ntfs_location {
        char *path_utf8;
        char *stream_name_utf16;
        u16 stream_name_utf16_num_chars;
-       ntfs_volume **ntfs_vol_p;
+       struct _ntfs_volume **ntfs_vol_p;
        bool is_reparse_point;
 };
 #endif
@@ -105,7 +103,7 @@ struct lookup_table_entry {
                struct lookup_table_entry *next_lte_in_swm;
                FILE *file_on_disk_fp;
        #ifdef WITH_NTFS_3G
-               ntfs_attr *attr;
+               struct _ntfs_attr *attr;
        #endif
        };
 #ifdef WITH_FUSE
@@ -312,7 +310,7 @@ static inline const u8 *dentry_stream_hash_resolved(const struct dentry *dentry,
        if (lte)
                return lte->hash;
        else
-               return NULL;
+               return zero_hash;
 }
 
 /* 
@@ -334,9 +332,7 @@ static inline const u8 *dentry_stream_hash(const struct dentry *dentry,
 static inline struct lookup_table_entry *
 dentry_unnamed_lte_resolved(const struct dentry *dentry)
 {
-       struct lookup_table_entry *lte;
        wimlib_assert(dentry->resolved);
-
        for (unsigned i = 0; i <= dentry->num_ads; i++)
                if (dentry_stream_name_len(dentry, i) == 0 &&
                     !is_zero_hash(dentry_stream_hash_resolved(dentry, i)))
@@ -348,9 +344,7 @@ static inline struct lookup_table_entry *
 dentry_unnamed_lte_unresolved(const struct dentry *dentry,
                              const struct lookup_table *table)
 {
-       struct lookup_table_entry *lte;
        wimlib_assert(!dentry->resolved);
-
        for (unsigned i = 0; i <= dentry->num_ads; i++)
                if (dentry_stream_name_len(dentry, i) == 0 &&
                     !is_zero_hash(dentry_stream_hash_unresolved(dentry, i)))