diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:08:16 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 11:08:16 +0200 |
commit | 0bfe7802d251286db03c7d9dfd1b3cd325060863 (patch) | |
tree | 8f71eda8f6243b2e0b71fb3458beff3ddd244e7e /src/database.c | |
parent | 3b6efa99daf466f95407560b294fce5e5170ef63 (diff) | |
download | mpd-0bfe7802d251286db03c7d9dfd1b3cd325060863.tar.gz mpd-0bfe7802d251286db03c7d9dfd1b3cd325060863.tar.xz mpd-0bfe7802d251286db03c7d9dfd1b3cd325060863.zip |
directory: path must not be NULL
For the root directory, let's set path to an empty string. This saves
a few checks.
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index 46d5a6352..d2c0ce3a4 100644 --- a/src/database.c +++ b/src/database.c @@ -39,7 +39,7 @@ static time_t directory_dbModTime; void db_init(void) { - music_root = directory_new(NULL, NULL); + music_root = directory_new("", NULL); updateDirectory(music_root); stats.numberOfSongs = countSongsIn(NULL); stats.dbPlayTime = sumSongTimesIn(NULL); @@ -240,7 +240,7 @@ db_load(void) struct stat st; if (!music_root) - music_root = directory_new(NULL, NULL); + music_root = directory_new("", NULL); while (!(fp = fopen(dbFile, "r")) && errno == EINTR) ; if (fp == NULL) { ERROR("unable to open db file \"%s\": %s\n", |