X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Flookup_table.h;h=d6bd5ee30726ecb6fb5ad22e21a4230413f1d512;hp=a01598c24896efd5a7df99b011ce1f2de17b36e1;hb=7bbd03a7f450e59ebd7481cd1af0639131630f42;hpb=e8c3ca2d1d0cac3d64985b45a9f654d2029a7518 diff --git a/include/wimlib/lookup_table.h b/include/wimlib/lookup_table.h index a01598c2..d6bd5ee3 100644 --- a/include/wimlib/lookup_table.h +++ b/include/wimlib/lookup_table.h @@ -259,7 +259,7 @@ wim_resource_size(const struct wim_lookup_table_entry *lte) static inline u64 wim_resource_chunks(const struct wim_lookup_table_entry *lte) { - return (wim_resource_size(lte) + WIM_CHUNK_SIZE - 1) / WIM_CHUNK_SIZE; + return DIV_ROUND_UP(wim_resource_size(lte), WIM_CHUNK_SIZE); } static inline u64 @@ -288,7 +288,7 @@ lte_filename_valid(const struct wim_lookup_table_entry *lte) } extern struct wim_lookup_table * -new_lookup_table(size_t capacity); +new_lookup_table(size_t capacity) _malloc_attribute; extern int read_lookup_table(WIMStruct *w); @@ -318,10 +318,11 @@ lookup_table_unlink(struct wim_lookup_table *table, struct wim_lookup_table_entr } extern struct wim_lookup_table_entry * -new_lookup_table_entry(void); +new_lookup_table_entry(void) _malloc_attribute; extern struct wim_lookup_table_entry * -clone_lookup_table_entry(const struct wim_lookup_table_entry *lte); +clone_lookup_table_entry(const struct wim_lookup_table_entry *lte) + _malloc_attribute; extern void print_lookup_table_entry(const struct wim_lookup_table_entry *entry,