conf: cleanup macros lxc_chroot

parent 003be47b
...@@ -1349,7 +1349,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1349,7 +1349,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);
...@@ -1388,6 +1387,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1388,6 +1387,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");
...@@ -1421,8 +1421,6 @@ int lxc_chroot(const struct lxc_rootfs *rootfs) ...@@ -1421,8 +1421,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