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:
Alejandro Colomar 2024-04-23 12:47:32 +02:00
parent af6a67ffa0
commit 2eb2f60b46
No known key found for this signature in database
GPG key ID: 9E8C1AFBBEFFDB32

View file

@ -13,6 +13,7 @@ nxt_fs_mkdir_p(const u_char *dir, mode_t mode)
{ {
char *start, *end, *dst; char *start, *end, *dst;
size_t dirlen; size_t dirlen;
nxt_int_t ret;
char path[PATH_MAX]; char path[PATH_MAX];
dirlen = nxt_strlen(dir); 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 = nxt_cpymem(dst, start, end - start);
*dst = '\0'; *dst = '\0';
if (nxt_slow_path(nxt_fs_mkdir((u_char *) path, mode) != NXT_OK ret = nxt_fs_mkdir((u_char *) path, mode);
&& nxt_errno != EEXIST)) if (nxt_slow_path(ret != NXT_OK && nxt_errno != EEXIST)) {
{
return NXT_ERROR; return NXT_ERROR;
} }