Skip to content

Commit

Permalink
Replace magic number with readable sig constant
Browse files Browse the repository at this point in the history
SIG_ERR is defined as 'pub const SIG_ERR: sighandler_t = !0 as sighandler_t;'
  • Loading branch information
anatol committed Apr 4, 2017
1 parent 5309a3e commit 6132fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/sys/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down

0 comments on commit 6132fb8

Please sign in to comment.