directory: isRootDirectory() is a one-liner
Improving the signal to noise ratio...
This commit is contained in:
parent
da79498afd
commit
11245dc119
@ -625,10 +625,7 @@ void directory_finish(void)
|
|||||||
|
|
||||||
int isRootDirectory(const char *name)
|
int isRootDirectory(const char *name)
|
||||||
{
|
{
|
||||||
if (name == NULL || name[0] == '\0' || strcmp(name, "/") == 0) {
|
return (!name || name[0] == '\0' || !strcmp(name, "/"));
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Directory *getSubDirectory(Directory * directory, const char *name)
|
static Directory *getSubDirectory(Directory * directory, const char *name)
|
||||||
|
Loading…
Reference in New Issue
Block a user