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/directory.h | |
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 'src/directory.h')
-rw-r--r-- | src/directory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/directory.h b/src/directory.h index 5609e4ea4..17c218bfb 100644 --- a/src/directory.h +++ b/src/directory.h @@ -63,7 +63,7 @@ static inline int directory_is_empty(struct directory *directory) static inline const char * directory_get_path(struct directory *dir) { - return dir->path ? dir->path : ""; + return dir->path; } void directory_prune_empty(struct directory *directory); |