directory: converted isRootDirectory() to an inline function
The function isRootDirectory() is tiny and can be converted to an inline function. Don't allow name==NULL.
This commit is contained in:
@@ -46,7 +46,11 @@ void directory_init(void);
|
||||
|
||||
void directory_finish(void);
|
||||
|
||||
int isRootDirectory(const char *name);
|
||||
static inline bool
|
||||
isRootDirectory(const char *name)
|
||||
{
|
||||
return name[0] == 0 || (name[0] == '/' && name[1] == 0);
|
||||
}
|
||||
|
||||
struct directory *
|
||||
directory_get_root(void);
|
||||
|
Reference in New Issue
Block a user