Skip to content

Commit

Permalink
conf: cleanup macros lxc_chroot
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 22, 2019
1 parent 003be47 commit 4fdd1f7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lxc/conf.c
Expand Up @@ -1349,7 +1349,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
int i, ret;
char *p, *p2;
char buf[LXC_LINELEN];
FILE *f;
char *root = rootfs->mount;

nroot = realpath(root, NULL);
Expand Down Expand Up @@ -1388,6 +1387,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
* inherited mounts are locked and we should live with all this trash.
*/
for (;;) {
__do_fclose FILE *f = NULL;
int progress = 0;

f = fopen("./proc/self/mountinfo", "r");
Expand Down Expand Up @@ -1421,8 +1421,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
progress++;
}

fclose(f);

if (!progress)
break;
}
Expand Down

0 comments on commit 4fdd1f7

Please sign in to comment.