inode_table: remove unused num_entries member
authorEric Biggers <ebiggers3@gmail.com>
Thu, 2 Jul 2015 23:16:40 +0000 (18:16 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 2 Jul 2015 23:16:40 +0000 (18:16 -0500)
include/wimlib/inode_table.h
src/inode_table.c

index a9322d0..9e8485a 100644 (file)
@@ -13,7 +13,6 @@ struct wim_dentry;
  * cases the inodes are linked by i_hlist_node.  */
 struct wim_inode_table {
        struct hlist_head *array;
-       size_t num_entries;
        size_t capacity;
        struct hlist_head extra_inodes;
 };
index 32c2e5b..e9c92d6 100644 (file)
@@ -37,7 +37,6 @@ init_inode_table(struct wim_inode_table *table, size_t capacity)
        table->array = CALLOC(capacity, sizeof(table->array[0]));
        if (!table->array)
                return WIMLIB_ERR_NOMEM;
-       table->num_entries = 0;
        table->capacity = capacity;
        INIT_HLIST_HEAD(&table->extra_inodes);
        return 0;
@@ -116,7 +115,6 @@ inode_table_new_dentry(struct wim_inode_table *table, const tchar *name,
                }
 
                /* Inode not found; create it.  */
-               table->num_entries++;
        }
 
        ret = new_dentry_with_new_inode(name, false, &dentry);
@@ -162,5 +160,4 @@ inode_table_prepare_inode_list(struct wim_inode_table *table,
                hlist_add_head(&inode->i_hlist_node, head);
        }
        INIT_HLIST_HEAD(&table->extra_inodes);
-       table->num_entries = 0;
 }