Drop unnecessary path_equal_ptr() wrapper

path_equal already works with NULL pointers.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-03-23 13:21:06 +01:00
parent 1df021927f
commit 1934242b72
9 changed files with 36 additions and 38 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ int null_or_empty_path_with_root(const char *fn, const char *root) {
* When looking under root_dir, we can't expect /dev/ to be mounted,
* so let's see if the path is a (possibly dangling) symlink to /dev/null. */
if (path_equal_ptr(path_startswith(fn, root ?: "/"), "dev/null"))
if (path_equal(path_startswith(fn, root ?: "/"), "dev/null"))
return true;
r = chase_and_stat(fn, root, CHASE_PREFIX_ROOT, NULL, &st);