diff options
Diffstat (limited to 'bftw.c')
-rw-r--r-- | bftw.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -300,7 +300,7 @@ static size_t bftw_child_nameoff(const struct bftw_file *parent) { /** Create a new bftw_file. */ static struct bftw_file *bftw_file_new(struct bftw_cache *cache, struct bftw_file *parent, const char *name) { size_t namelen = strlen(name); - size_t size = sizeof(struct bftw_file) + namelen + 1; + size_t size = BFS_FLEX_SIZEOF(struct bftw_file, name, namelen + 1); struct bftw_file *file = malloc(size); if (!file) { |