Commit 11245dc1 authored by Eric Wong's avatar Eric Wong Committed by Max Kellermann

directory: isRootDirectory() is a one-liner

Improving the signal to noise ratio...
parent da79498a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment