conf: cleanup macros lxc_chroot

parent ecd9800c
...@@ -1324,7 +1324,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1324,7 +1324,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
int i, ret; int i, ret;
char *p, *p2; char *p, *p2;
char buf[LXC_LINELEN]; char buf[LXC_LINELEN];
FILE *f;
char *root = rootfs->mount; char *root = rootfs->mount;
nroot = realpath(root, NULL); nroot = realpath(root, NULL);
...@@ -1363,6 +1362,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1363,6 +1362,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
* inherited mounts are locked and we should live with all this trash. * inherited mounts are locked and we should live with all this trash.
*/ */
for (;;) { for (;;) {
__do_fclose FILE *f = NULL;
int progress = 0; int progress = 0;
f = fopen("./proc/self/mountinfo", "r"); f = fopen("./proc/self/mountinfo", "r");
...@@ -1396,8 +1396,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1396,8 +1396,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
progress++; progress++;
} }
fclose(f);
if (!progress) if (!progress)
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment