mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-13 18:02:40 +00:00
attach: cleanup macros lxc_proc_close_ns_fd
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
3a6e3bf598
commit
fd2a88b190
@ -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)
|
static inline void lxc_proc_close_ns_fd(struct lxc_proc_context_info *ctx)
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < LXC_NS_MAX; i++) {
|
||||||
|
__do_close_prot_errno int fd = ctx->ns_fd[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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user