summaryrefslogtreecommitdiffstats
path: root/src/shared/vpick.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-04-15 19:37:34 +0200
committerMike Yuan <me@yhndnzj.com>2024-04-15 19:38:08 +0200
commitac68e6d691f6f00a24c6743363a0a887d9afbb52 (patch)
tree4448cb52c502b73024624bbd8e709e3e1eb7fb05 /src/shared/vpick.c
parentshared/vpick: align function args correctly, add missing assertion (diff)
downloadsystemd-ac68e6d691f6f00a24c6743363a0a887d9afbb52.tar.xz
systemd-ac68e6d691f6f00a24c6743363a0a887d9afbb52.zip
shared/vpick: drop unneeded strempty()
prefix_roota() handles NULL root param gracefully.
Diffstat (limited to '')
-rw-r--r--src/shared/vpick.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/shared/vpick.c b/src/shared/vpick.c
index 5e2b34e7b0..c4c8accb37 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:
*