]> git.ipfire.org Git - thirdparty/systemd.git/commit
path-util: move empty_or_root_to_null() from chase.c
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 28 Jun 2025 11:55:11 +0000 (20:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 29 Jun 2025 18:45:29 +0000 (03:45 +0900)
commit8ce463639a67b68ba5b4cec50cf36e138a9b0f0e
treec67dff7228a457451c46b6757758b5799b03bb64
parentcdd3aba3dfe3618f9e22522b32dda88075ef7804
path-util: move empty_or_root_to_null() from chase.c

And rename it to empty_or_root_harder_to_null(), as it also checks if
the input path effectively points to the root by calling path_is_root().
This also adds simple test cases for the function.
src/basic/chase.c
src/basic/path-util.c
src/basic/path-util.h
src/test/test-path-util.c