summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_fs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nxt_fs.c b/src/nxt_fs.c
index 0af84742..a02c51af 100644
--- a/src/nxt_fs.c
+++ b/src/nxt_fs.c
@@ -11,9 +11,10 @@ static nxt_int_t nxt_fs_mkdir(const u_char *dir, mode_t mode);
nxt_int_t
nxt_fs_mkdir_p(const u_char *dir, mode_t mode)
{
- char *start, *end, *dst;
- size_t dirlen;
- char path[PATH_MAX];
+ char *start, *end, *dst;
+ size_t dirlen;
+ nxt_int_t ret;
+ char path[PATH_MAX];
dirlen = nxt_strlen(dir);
@@ -31,9 +32,8 @@ nxt_fs_mkdir_p(const u_char *dir, mode_t mode)
dst = nxt_cpymem(dst, start, end - start);
*dst = '\0';
- if (nxt_slow_path(nxt_fs_mkdir((u_char *) path, mode) != NXT_OK
- && nxt_errno != EEXIST))
- {
+ ret = nxt_fs_mkdir((u_char *) path, mode);
+ if (nxt_slow_path(ret != NXT_OK && nxt_errno != EEXIST)) {
return NXT_ERROR;
}