summaryrefslogtreecommitdiffstats
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-25 00:45:16 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 20:36:12 +0200
commite62d8c3944745ed276e6d4f33153009860e5cfc5 (patch)
treee7f70ed3b80581017b6340723ab6f1d6b9c30bad /src/core/mount.c
parentstrbuf: replace quick sort with bubble sort (diff)
downloadsystemd-e62d8c3944745ed276e6d4f33153009860e5cfc5.tar.xz
systemd-e62d8c3944745ed276e6d4f33153009860e5cfc5.zip
Modernization
Use _cleanup_ and wrap lines to ~80 chars and such.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 7839300110..130dc39795 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1710,7 +1710,8 @@ static int mount_enumerate(Manager *m) {
assert(m);
if (!m->proc_self_mountinfo) {
- if (!(m->proc_self_mountinfo = fopen("/proc/self/mountinfo", "re")))
+ m->proc_self_mountinfo = fopen("/proc/self/mountinfo", "re");
+ if (!m->proc_self_mountinfo)
return -errno;
m->mount_watch.type = WATCH_MOUNT;
@@ -1724,7 +1725,8 @@ static int mount_enumerate(Manager *m) {
return -errno;
}
- if ((r = mount_load_proc_self_mountinfo(m, false)) < 0)
+ r = mount_load_proc_self_mountinfo(m, false);
+ if (r < 0)
goto fail;
return 0;