mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
namespace-util: make use of TAKE_FD()
No functional changes.
This commit is contained in:
parent
71ec74d193
commit
04c84cd173
@ -62,21 +62,19 @@ int namespace_open(pid_t pid, int *pidns_fd, int *mntns_fd, int *netns_fd, int *
|
||||
}
|
||||
|
||||
if (pidns_fd)
|
||||
*pidns_fd = pidnsfd;
|
||||
*pidns_fd = TAKE_FD(pidnsfd);
|
||||
|
||||
if (mntns_fd)
|
||||
*mntns_fd = mntnsfd;
|
||||
*mntns_fd = TAKE_FD(mntnsfd);
|
||||
|
||||
if (netns_fd)
|
||||
*netns_fd = netnsfd;
|
||||
*netns_fd = TAKE_FD(netnsfd);
|
||||
|
||||
if (userns_fd)
|
||||
*userns_fd = usernsfd;
|
||||
*userns_fd = TAKE_FD(usernsfd);
|
||||
|
||||
if (root_fd)
|
||||
*root_fd = rfd;
|
||||
|
||||
pidnsfd = mntnsfd = netnsfd = usernsfd = -1;
|
||||
*root_fd = TAKE_FD(rfd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user