From e3e5ae91d07f7d4256acac7abac6a204b6abc491 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 28 Sep 2021 21:17:57 -0700 Subject: [PATCH] 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. --- library/std/src/sys/unix/process/process_unix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 13b384d8899..caef9914ac2 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -335,7 +335,7 @@ unsafe fn do_exec( 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() {