Replace magic number with readable sig constant
SIG_ERR is defined as 'pub const SIG_ERR: sighandler_t = !0 as sighandler_t;'
This commit is contained in:
parent
5309a3e31d
commit
6132fb83b4
@ -92,7 +92,7 @@ pub fn init() {
|
||||
|
||||
#[cfg(not(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia")))]
|
||||
unsafe fn reset_sigpipe() {
|
||||
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != !0);
|
||||
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR);
|
||||
}
|
||||
#[cfg(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia"))]
|
||||
unsafe fn reset_sigpipe() {}
|
||||
|
Loading…
Reference in New Issue
Block a user