directory: use mpd_sizeof_str_flex_array for path, too

This way we avoid unnecessary heap allocations.
This commit is contained in:
Eric Wong
2008-10-13 09:55:00 +02:00
committed by Max Kellermann
parent 8867bd554c
commit 8d907fb9fa
2 changed files with 8 additions and 7 deletions

View File

@@ -35,13 +35,13 @@
#define DIRECTORY_FS_CHARSET "fs_charset: "
struct directory {
char *path;
struct dirvec children;
struct songvec songs;
struct directory *parent;
ino_t inode;
dev_t device;
unsigned stat; /* not needed if ino_t == dev_t == 0 is impossible */
char path[sizeof(long)];
};
static inline bool