diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-11 14:20:38 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-11 14:20:44 -0300 |
commit | 10c03e9e82258fee9a9af4c4eacdc4af1e52680c (patch) | |
tree | dafbfca7461d9df2d5a54fb14181f44ade687d85 /src/basic/path-util.c | |
parent | 43694a8cc70667498f3ffc5d9325b7d0428558e5 (diff) |
basic: simplify path_is_mount_point() a bit
This removes two uses of the ternary operator.
Diffstat (limited to 'src/basic/path-util.c')
-rw-r--r-- | src/basic/path-util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 8f49d65266..5cbfc145a4 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -656,9 +656,11 @@ int path_is_mount_point(const char *t, int flags) { canonical = canonicalize_file_name(t); if (!canonical) return -errno; + + t = canonical; } - r = path_get_parent(canonical ?: t, &parent); + r = path_get_parent(t, &parent); if (r < 0) return r; @@ -666,7 +668,7 @@ int path_is_mount_point(const char *t, int flags) { if (fd < 0) return -errno; - return fd_is_mount_point(fd, basename(canonical ?: t), flags); + return fd_is_mount_point(fd, basename(t), flags); } int path_is_read_only_fs(const char *path) { |