X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fmount.c;h=130dc39795a89288f1964b4ca6238a84ea14e2c3;hp=78393001104d131174dc18e7ef106cb5a96feab4;hb=e62d8c394474;hpb=3c8bed4ee061f96acb4d70a591a9849bddd2a659 diff --git a/src/core/mount.c b/src/core/mount.c index 783930011..130dc3979 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;