diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 10:49:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 10:49:05 +0200 |
commit | 25f67da58c671885c86ecfd991f28ec82b6ce1e2 (patch) | |
tree | 7da9638ff323573d2aa53e70337866f8935114a0 /src/dbUtils.c | |
parent | 3c1142cbcbd428ac5784ef098ac5e7a393647aa6 (diff) | |
download | mpd-25f67da58c671885c86ecfd991f28ec82b6ce1e2.tar.gz mpd-25f67da58c671885c86ecfd991f28ec82b6ce1e2.tar.xz mpd-25f67da58c671885c86ecfd991f28ec82b6ce1e2.zip |
directory: converted typedef Directory to struct directory
The struct can be forward-declared by other headers, which relaxes the
header dependencies.
Diffstat (limited to '')
-rw-r--r-- | src/dbUtils.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c index 3b5d896b6..fb32769ae 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -46,8 +46,8 @@ typedef struct _SearchStats { unsigned long playTime; } SearchStats; -static int countSongsInDirectory(Directory * directory, - void *data) +static int +countSongsInDirectory(struct directory *directory, void *data) { int *count = (int *)data; @@ -56,7 +56,8 @@ static int countSongsInDirectory(Directory * directory, return 0; } -static int printDirectoryInDirectory(Directory * directory, void *data) +static int +printDirectoryInDirectory(struct directory *directory, void *data) { struct client *client = data; if (directory->path) { @@ -356,15 +357,16 @@ int listAllUniqueTags(struct client *client, int type, int numConditionals, return ret; } -static int sumSavedFilenameMemoryInDirectory(Directory * dir, void *data) +static int +sumSavedFilenameMemoryInDirectory(struct directory *dir, void *data) { int *sum = data; if (!dir->path) return 0; - *sum += (strlen(getDirectoryPath(dir)) + 1 - sizeof(Directory *)) * - dir->songs.nr; + *sum += (strlen(getDirectoryPath(dir)) + 1 + - sizeof(struct directory *)) * dir->songs.nr; return 0; } |