summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2021-09-28 21:17:57 -0700
committerDavid Tolnay <dtolnay@gmail.com>2021-09-28 21:22:37 -0700
commite3e5ae91d07f7d4256acac7abac6a204b6abc491 (patch)
treec92a4fb7a49039e2a45dd3a26187d7129f4b669f /library/std/src/sys
parentf1c8accf90d797ef32a56ee08ed7705a4b500c17 (diff)
downloadrust-e3e5ae91d07f7d4256acac7abac6a204b6abc491.tar.gz
rust-e3e5ae91d07f7d4256acac7abac6a204b6abc491.zip
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.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/unix/process/process_unix.rs2
1 files changed, 1 insertions, 1 deletions
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 @@ 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() {