projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43694a8
)
basic: simplify path_is_mount_point() a bit
author
Lennart Poettering
<lennart@poettering.net>
Sat, 11 Jul 2015 17:20:38 +0000
(14:20 -0300)
committer
Lennart Poettering
<lennart@poettering.net>
Sat, 11 Jul 2015 17:20:44 +0000
(14:20 -0300)
This removes two uses of the ternary operator.
src/basic/path-util.c
patch
|
blob
|
history
diff --git
a/src/basic/path-util.c
b/src/basic/path-util.c
index
8f49d65
..
5cbfc14
100644
(file)
--- 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) {