diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:08:16 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:48 -0700 |
commit | 313e8e3ecc15e65700e64252207227612d6d9195 (patch) | |
tree | 3d6a0ee583b8f415f6937fdfa11d7b5b5046c77b /src/database.c | |
parent | d32498dfec5f97275e6d769080a2a39c16f214c8 (diff) | |
download | mpd-313e8e3ecc15e65700e64252207227612d6d9195.tar.gz mpd-313e8e3ecc15e65700e64252207227612d6d9195.tar.xz mpd-313e8e3ecc15e65700e64252207227612d6d9195.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 '')
-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 98e50ad87..bd278a635 100644 --- a/src/database.c +++ b/src/database.c @@ -37,7 +37,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); @@ -233,7 +233,7 @@ int 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", |