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>
This commit is contained in:
parent
af6a67ffa0
commit
2eb2f60b46
1 changed files with 6 additions and 6 deletions
12
src/nxt_fs.c
12
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue