From dccffc82694c26ac19b05cd6f3e94de32c2e71ae Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 30 Jul 2018 20:30:50 +0200 Subject: [PATCH] conf: don't return a clobbered errno value Signed-off-by: Wolfgang Bumiller --- src/lxc/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 7fa5a1504..d691e46f9 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1418,7 +1418,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) f = fopen("./proc/self/mountinfo", "r"); if (!f) { SYSERROR("Failed to open \"/proc/self/mountinfo\""); - return -errno; + return -1; } while (fgets(buf, LXC_LINELEN, f)) { @@ -3466,7 +3466,7 @@ int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name, ret = mount(path, path, "rootfs", MS_BIND, NULL); if (ret < 0) { ERROR("Failed to bind mount container / onto itself"); - return -errno; + return -1; } TRACE("Bind mounted container / onto itself"); -- 2.47.2