From ac68e6d691f6f00a24c6743363a0a887d9afbb52 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 16 Apr 2024 01:37:34 +0800 Subject: [PATCH] shared/vpick: drop unneeded strempty() prefix_roota() handles NULL root param gracefully. --- src/shared/vpick.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/shared/vpick.c b/src/shared/vpick.c index 5e2b34e7b08..c4c8accb376 100644 --- a/src/shared/vpick.c +++ b/src/shared/vpick.c @@ -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: * -- 2.47.3