From 22993fe41a65b7fc4215f2378e1251c790db0ecc Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 14 Mar 2023 17:21:36 +0000 Subject: 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 Signed-off-by: Andrew Clayton --- src/nxt_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_fs.c') 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 == '/') { -- cgit