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:
Max Kellermann
2008-10-08 11:08:16 +02:00
parent 3b6efa99da
commit 0bfe7802d2
3 changed files with 9 additions and 11 deletions

View File

@@ -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;
}