diff options
author | Alejandro Colomar <alx@kernel.org> | 2024-04-23 12:47:32 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2024-06-18 22:59:44 +0200 |
commit | 2eb2f60b46feda3d39aed2211b82673ecfd7c67d (patch) | |
tree | e108ebdc6c4711480d13ebb73f2f4d1987795227 /src | |
parent | af6a67ffa0c5accb90126972116cb1e8e332f3b7 (diff) | |
download | unit-2eb2f60b46feda3d39aed2211b82673ecfd7c67d.tar.gz unit-2eb2f60b46feda3d39aed2211b82673ecfd7c67d.tar.bz2 |
fs: Use a temporary variable in nxt_fs_mkdir_p()
This avoids breaking a long line.
Tested-by: Andy Postnikov <apostnikov@gmail.com>
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_fs.c | 12 |
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; } |