shared/vpick: drop unneeded strempty()

prefix_roota() handles NULL root param gracefully.
This commit is contained in:
Mike Yuan
2024-04-16 01:37:34 +08:00
parent 6d8690ecd3
commit ac68e6d691

View File

@@ -143,8 +143,6 @@ static int pin_choice(
assert(filter);
assert(ret);
toplevel_path = strempty(toplevel_path);
if (inode_fd < 0 || FLAGS_SET(flags, PICK_RESOLVE)) {
r = chaseat(toplevel_fd,
inode_path,
@@ -274,8 +272,6 @@ static int make_choice(
assert(filter);
assert(ret);
toplevel_path = strempty(toplevel_path);
if (inode_fd < 0) {
r = chaseat(toplevel_fd, inode_path, CHASE_AT_RESOLVE_IN_ROOT, NULL, &inode_fd);
if (r < 0)
@@ -506,8 +502,6 @@ int path_pick(
assert(filter);
assert(ret);
toplevel_path = strempty(toplevel_path);
/* Given a path, resolve .v/ subdir logic (if used!), and returns the choice made. This supports
* three ways to be called:
*