diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-23 20:47:45 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-23 20:47:45 +0200 |
commit | d095d52ed4aadd916bd025e1c39bbe2977da3997 (patch) | |
tree | e42097120cc8c5aedf7a7a82158979522fe91ac2 /src/directory.h | |
parent | 3263dbe51793f355eeb51732396474c91feeb1ba (diff) | |
download | mpd-d095d52ed4aadd916bd025e1c39bbe2977da3997.tar.gz mpd-d095d52ed4aadd916bd025e1c39bbe2977da3997.tar.xz mpd-d095d52ed4aadd916bd025e1c39bbe2977da3997.zip |
Directory: don't allocate stat information dynamically
This should save a few thousand ops. Not worth it to malloc
for such a small (3-words on 32-bit ARM and x86) structures.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to '')
-rw-r--r-- | src/directory.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/directory.h b/src/directory.h index be191bf5d..63ff6a548 100644 --- a/src/directory.h +++ b/src/directory.h @@ -23,17 +23,14 @@ typedef List DirectoryList; -typedef struct _DirectoryStat { - ino_t inode; - dev_t device; -} DirectoryStat; - typedef struct _Directory { char *path; DirectoryList *subDirectories; SongList *songs; struct _Directory *parent; - DirectoryStat *stat; + ino_t inode; + dev_t device; + unsigned stat; /* not needed if ino_t == dev_t == 0 is impossible */ } Directory; void readDirectoryDBIfUpdateIsFinished(void); |