aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:08:04 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:48 -0700
commitd32498dfec5f97275e6d769080a2a39c16f214c8 (patch)
tree35d37226050d2be7959d35b864d0d28127884d38
parentb0364ba70de4d85d4d6ea510235982a024978305 (diff)
downloadmpd-d32498dfec5f97275e6d769080a2a39c16f214c8.tar.gz
mpd-d32498dfec5f97275e6d769080a2a39c16f214c8.tar.xz
mpd-d32498dfec5f97275e6d769080a2a39c16f214c8.zip
directory: directory_get_path(NULL) is not allowed
Also convert directory_get_path() to an inline function, which returns a constant string.
Diffstat (limited to '')
-rw-r--r--src/directory.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/directory.h b/src/directory.h
index a95e0d7db..5609e4ea4 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -61,7 +61,10 @@ static inline int directory_is_empty(struct directory *directory)
return directory->children.nr == 0 && directory->songs.nr == 0;
}
-int printDirectoryInfo(int fd, const char *dirname);
+static inline const char * directory_get_path(struct directory *dir)
+{
+ return dir->path ? dir->path : "";
+}
void directory_prune_empty(struct directory *directory);
@@ -86,6 +89,4 @@ int directory_walk(struct directory *directory,
int (*forEachSong) (struct mpd_song *, void *),
int (*forEachDir) (struct directory *, void *), void *data);
-#define directory_get_path(dir) ((dir && dir->path) ? dir->path : "")
-
#endif