Skip to content

Commit 6132fb8

Browse files
committed
Replace magic number with readable sig constant
SIG_ERR is defined as 'pub const SIG_ERR: sighandler_t = !0 as sighandler_t;'
1 parent 5309a3e commit 6132fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn init() {
9292

9393
#[cfg(not(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia")))]
9494
unsafe fn reset_sigpipe() {
95-
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != !0);
95+
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR);
9696
}
9797
#[cfg(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia"))]
9898
unsafe fn reset_sigpipe() {}

0 commit comments

Comments
 (0)