directory: path must not be NULL
For the root directory, let's set path to an empty string. This saves a few checks.
This commit is contained in:
@@ -73,8 +73,6 @@ directory_is_empty(struct directory *directory)
|
||||
static inline const char *
|
||||
directory_get_path(struct directory *directory)
|
||||
{
|
||||
if (directory->path == NULL)
|
||||
return "";
|
||||
return directory->path;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user