make clippy happy
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
9202081202
commit
7564d55dad
@ -399,15 +399,15 @@ impl ProxyMessageBuffer {
|
||||
pub fn arg_fd(&self, arg: u32, flags: c_int) -> Result<Fd, Error> {
|
||||
let fd = self.arg(arg)? as RawFd;
|
||||
// we pass negative ones 'as-is', others get opened via the pidfd
|
||||
if fd == libc::AT_FDCWD {
|
||||
Ok(if fd == libc::AT_FDCWD {
|
||||
// NOTE: we could pass this one through, but let's be explicit here, in the future we
|
||||
// might want to reuse this one?
|
||||
Ok(self.pid_fd().fd_cwd()?)
|
||||
self.pid_fd().fd_cwd()?
|
||||
} else if fd < 0 {
|
||||
return Ok(Fd(fd));
|
||||
Fd(fd)
|
||||
} else {
|
||||
Ok(self.pid_fd().fd_num(fd, flags)?)
|
||||
}
|
||||
self.pid_fd().fd_num(fd, flags)?
|
||||
})
|
||||
}
|
||||
|
||||
/// Checked way to get a c_uint argument.
|
||||
|
Loading…
Reference in New Issue
Block a user