diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-29 13:18:27 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-29 13:18:27 +0200 |
commit | 11245dc1195c47f425471da927af7da0bca60c3e (patch) | |
tree | 4062ca8ff1d831239f86be0b890830926ae4369c | |
parent | da79498afdf649cb0c41a1bb25e6b1dbe2909d35 (diff) | |
download | mpd-11245dc1195c47f425471da927af7da0bca60c3e.tar.gz mpd-11245dc1195c47f425471da927af7da0bca60c3e.tar.xz mpd-11245dc1195c47f425471da927af7da0bca60c3e.zip |
directory: isRootDirectory() is a one-liner
Improving the signal to noise ratio...
-rw-r--r-- | src/directory.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/directory.c b/src/directory.c index 9b18db4d6..9595b1ff2 100644 --- a/src/directory.c +++ b/src/directory.c @@ -625,10 +625,7 @@ void directory_finish(void) int isRootDirectory(const char *name) { - if (name == NULL || name[0] == '\0' || strcmp(name, "/") == 0) { - return 1; - } - return 0; + return (!name || name[0] == '\0' || !strcmp(name, "/")); } static Directory *getSubDirectory(Directory * directory, const char *name) |