From: Lennart Poettering Date: Mon, 25 Mar 2019 15:49:57 +0000 (+0100) Subject: namespace: get rid of local variable X-Git-Tag: v242-rc1~62^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39e91a2777e0ff93f0e9f39066eb7c32b949fdd0;p=thirdparty%2Fsystemd.git namespace: get rid of local variable --- diff --git a/src/core/namespace.c b/src/core/namespace.c index 48517cb06ed..8997fc170b8 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -1044,11 +1044,10 @@ static int apply_mount( /* Change the per-mount readonly flag on an existing mount */ static int remount_bind_readonly(const char *path, unsigned long orig_flags) { - int r; - - r = mount(NULL, path, NULL, MS_REMOUNT | MS_BIND | MS_RDONLY | orig_flags, NULL); + if (mount(NULL, path, NULL, MS_REMOUNT | MS_BIND | MS_RDONLY | orig_flags, NULL) < 0) + return -errno; - return r < 0 ? -errno : 0; + return 0; } static int make_read_only(const MountEntry *m, char **blacklist, FILE *proc_self_mountinfo) {