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>
This commit is contained in:
@@ -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 == '/') {
|
||||
|
||||
Reference in New Issue
Block a user