diff options
Diffstat (limited to 'src/bindfs.c')
-rw-r--r-- | src/bindfs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/bindfs.c b/src/bindfs.c index 2593676..eb8b874 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -249,8 +249,6 @@ static int is_mirrored_user(uid_t uid) static char *process_path(const char *path, bool resolve_symlinks) { - char *res; - if (path == NULL) { /* possible? */ errno = EINVAL; return NULL; @@ -262,13 +260,10 @@ static char *process_path(const char *path, bool resolve_symlinks) if (*path == '\0') path = "."; - if (resolve_symlinks && settings.resolve_symlinks) { - res = realpath(path, NULL); - if (res) - return res; - } - - return strdup(path); + if (resolve_symlinks && settings.resolve_symlinks) + return realpath(path, NULL); + else + return strdup(path); } static int getattr_common(const char *procpath, struct stat *stbuf) |