Skip to content

Commit

Permalink
simplify at_rawfd()
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Nov 5, 2023
1 parent 613239d commit 20c4fff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ libc_bitflags!(
all(feature = "process", any(target_os = "android", target_os = "linux"))
))]
pub(crate) fn at_rawfd(fd: Option<RawFd>) -> raw::c_int {
match fd {
None => libc::AT_FDCWD,
Some(fd) => fd,
}
fd.unwrap_or(libc::AT_FDCWD)
}

feature! {
Expand Down

0 comments on commit 20c4fff

Please sign in to comment.