summaryrefslogtreecommitdiffstats
path: root/src/basic/path-util.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-05-08 10:43:49 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-28 06:44:38 +0200
commit4ff361cc8611459388d7f75955bfe645f894f065 (patch)
treef0fe232aee56d0517cdd0e8b86f1d497afe65f85 /src/basic/path-util.h
parentpath-util: make path_extract_filename/directory() handle "." gracefully (diff)
downloadsystemd-4ff361cc8611459388d7f75955bfe645f894f065.tar.xz
systemd-4ff361cc8611459388d7f75955bfe645f894f065.zip
tree-wide: always drop unnecessary dot in path
Diffstat (limited to 'src/basic/path-util.h')
-rw-r--r--src/basic/path-util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index e447608d40..c6d4668794 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -71,7 +71,7 @@ char* path_extend_internal(char **x, ...);
#define path_extend(x, ...) path_extend_internal(x, __VA_ARGS__, POINTER_MAX)
#define path_join(...) path_extend_internal(NULL, __VA_ARGS__, POINTER_MAX)
-char* path_simplify(char *path, bool kill_dots);
+char* path_simplify(char *path);
enum {
PATH_CHECK_FATAL = 1 << 0, /* If not set, then error message is appended with 'ignoring'. */
@@ -109,7 +109,7 @@ int fsck_exists(const char *fstype);
* directory. Excludes the specified directory itself */
#define PATH_FOREACH_PREFIX(prefix, path) \
for (char *_slash = ({ \
- path_simplify(strcpy(prefix, path), false); \
+ path_simplify(strcpy(prefix, path)); \
streq(prefix, "/") ? NULL : strrchr(prefix, '/'); \
}); \
_slash && ((*_slash = 0), true); \
@@ -118,7 +118,7 @@ int fsck_exists(const char *fstype);
/* Same as PATH_FOREACH_PREFIX but also includes the specified path itself */
#define PATH_FOREACH_PREFIX_MORE(prefix, path) \
for (char *_slash = ({ \
- path_simplify(strcpy(prefix, path), false); \
+ path_simplify(strcpy(prefix, path)); \
if (streq(prefix, "/")) \
prefix[0] = 0; \
strrchr(prefix, 0); \