directory: isRootDirectory() is a one-liner

Improving the signal to noise ratio...
This commit is contained in:
Eric Wong 2008-09-29 13:18:27 +02:00 committed by Max Kellermann
parent da79498afd
commit 11245dc119

View File

@ -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)