Skip to content

Commit

Permalink
Clean up unneeded explicit pointer cast
Browse files Browse the repository at this point in the history
The reference automatically coerces to a pointer. Writing an explicit
cast here is slightly misleading because that's most commonly used when
a pointer needs to be converted from one pointer type to another, e.g.
`*const c_void` to `*const sigaction` or vice versa.
  • Loading branch information
dtolnay committed Sep 29, 2021
1 parent f1c8acc commit e3e5ae9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl Command {
cvt(libc::pthread_sigmask(libc::SIG_SETMASK, set.as_ptr(), ptr::null_mut()))?;
let mut action: libc::sigaction = mem::zeroed();
action.sa_sigaction = libc::SIG_DFL;
cvt(libc::sigaction(libc::SIGPIPE, &action as *const _, ptr::null_mut()))?;
cvt(libc::sigaction(libc::SIGPIPE, &action, ptr::null_mut()))?;
}

for callback in self.get_closures().iter_mut() {
Expand Down

0 comments on commit e3e5ae9

Please sign in to comment.