From 313e8e3ecc15e65700e64252207227612d6d9195 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:08:16 +0200 Subject: directory: path must not be NULL For the root directory, let's set path to an empty string. This saves a few checks. --- src/directory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/directory.h') diff --git a/src/directory.h b/src/directory.h index 5609e4ea4..17c218bfb 100644 --- a/src/directory.h +++ b/src/directory.h @@ -63,7 +63,7 @@ static inline int directory_is_empty(struct directory *directory) static inline const char * directory_get_path(struct directory *dir) { - return dir->path ? dir->path : ""; + return dir->path; } void directory_prune_empty(struct directory *directory); -- cgit v1.2.3