Skip to content

Commit e3e5ae9

Browse files
committed
Clean up unneeded explicit pointer cast
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.
1 parent f1c8acc commit e3e5ae9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/process/process_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ impl Command {
335335
cvt(libc::pthread_sigmask(libc::SIG_SETMASK, set.as_ptr(), ptr::null_mut()))?;
336336
let mut action: libc::sigaction = mem::zeroed();
337337
action.sa_sigaction = libc::SIG_DFL;
338-
cvt(libc::sigaction(libc::SIGPIPE, &action as *const _, ptr::null_mut()))?;
338+
cvt(libc::sigaction(libc::SIGPIPE, &action, ptr::null_mut()))?;
339339
}
340340

341341
for callback in self.get_closures().iter_mut() {

0 commit comments

Comments
 (0)