Skip to content

Commit

Permalink
conf: don't return a clobbered errno value
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
  • Loading branch information
Blub committed Jul 30, 2018
1 parent 3437f95 commit dccffc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/conf.c
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit dccffc8

Please sign in to comment.