basic/fs-util: remove logically dead code
We can jump to chase_one from two places. In the first 'todo' is set to 'buffer', which comes from path_make_absolute_cwd() and is nonnull In the second 'todo' is set to 'joined' which is checked to be nonull a few lines above the jump. So let's kill the code that deals with null todo there. CID #1390941.
This commit is contained in:
parent
03d3a9d5be
commit
027cc9c92e
|
@ -919,25 +919,12 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
|||
return exists;
|
||||
|
||||
chased_one:
|
||||
|
||||
if (ret) {
|
||||
char *c;
|
||||
|
||||
if (done) {
|
||||
if (todo) {
|
||||
c = strjoin(done, todo);
|
||||
if (!c)
|
||||
return -ENOMEM;
|
||||
} else
|
||||
c = TAKE_PTR(done);
|
||||
} else {
|
||||
if (todo)
|
||||
c = strdup(todo);
|
||||
else
|
||||
c = strdup("/");
|
||||
if (!c)
|
||||
return -ENOMEM;
|
||||
}
|
||||
c = strjoin(strempty(done), todo);
|
||||
if (!c)
|
||||
return -ENOMEM;
|
||||
|
||||
*ret = c;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue