aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-28 20:01:32 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-28 20:01:32 -0700
commite7203ca8349f03c5364a97b9dee68a83e4d506dc (patch)
tree63c3a7d24d38686af0147528e8249a6e46c025c4 /src
parent1426cde428144dda30a3848e0a8030bf4e052681 (diff)
downloadmpd-e7203ca8349f03c5364a97b9dee68a83e4d506dc.tar.gz
mpd-e7203ca8349f03c5364a97b9dee68a83e4d506dc.tar.xz
mpd-e7203ca8349f03c5364a97b9dee68a83e4d506dc.zip
directory: isRootDirectory() is a one-liner
Improving the signal to noise ratio...
Diffstat (limited to 'src')
-rw-r--r--src/directory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/directory.c b/src/directory.c
index 56f31bd0f..124ea194e 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -623,10 +623,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)