attach: cleanup macros lxc_proc_close_ns_fd

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2019-02-21 00:12:15 +01:00
parent 3a6e3bf598
commit fd2a88b190
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -125,14 +125,8 @@ static struct lxc_proc_context_info *lxc_proc_get_context_info(pid_t pid)
static inline void lxc_proc_close_ns_fd(struct lxc_proc_context_info *ctx)
{
int i;
for (i = 0; i < LXC_NS_MAX; i++) {
if (ctx->ns_fd[i] < 0)
continue;
close(ctx->ns_fd[i]);
ctx->ns_fd[i] = -EBADF;
for (int i = 0; i < LXC_NS_MAX; i++) {
__do_close_prot_errno int fd = ctx->ns_fd[i];
}
}