summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-03-14 17:21:36 +0000
committerAndrew Clayton <a.clayton@nginx.com>2023-04-03 14:53:04 +0100
commit22993fe41a65b7fc4215f2378e1251c790db0ecc (patch)
tree1ffb0d3b7d78eec1c0bf567857cbd661b7e96cf2
parent497b84c18f6b903fc5cc5dd05c50e4648d2db777 (diff)
downloadunit-22993fe41a65b7fc4215f2378e1251c790db0ecc.tar.gz
unit-22993fe41a65b7fc4215f2378e1251c790db0ecc.tar.bz2
Remove a useless assignment in nxt_fs_mkdir_all().
This was reported by the 'Clang Static Analyzer' as a 'dead nested assignment'. We set end outside the loop but the first time we use it is to assign it in the loop (not used anywhere else). Further cleanup could be to reduce the scope of end by moving its declaration inside the loop. Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--src/nxt_fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_fs.c b/src/nxt_fs.c
index a467da98..e10c5bcb 100644
--- a/src/nxt_fs.c
+++ b/src/nxt_fs.c
@@ -20,7 +20,7 @@ nxt_fs_mkdir_all(const u_char *dir, mode_t mode)
nxt_assert(dirlen < PATH_MAX && dirlen > 1 && dir[0] == '/');
dst = path;
- start = end = (char *) dir;
+ start = (char *) dir;
while (*start != '\0') {
if (*start == '/') {