about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAriel Ben-Yehuda <arielb1@mail.tau.ac.il>2017-04-05 23:01:12 +0000
committerGitHub <noreply@github.com>2017-04-05 23:01:12 +0000
commitfa0f1027d1e522d6c3fea35ab31c3ec282f162ac (patch)
tree3731946999e374ec27941adfc9f3275d444aedd4 /src/libstd
parenta69fcfaecfc4c8bfa25621a77f73aade95aea4b4 (diff)
parent6132fb83b45cc9c519c2fee29e497460db06ba2a (diff)
downloadrust-fa0f1027d1e522d6c3fea35ab31c3ec282f162ac.tar.gz
rust-fa0f1027d1e522d6c3fea35ab31c3ec282f162ac.zip
Rollup merge of #41054 - anatol:master, r=alexcrichton
Replace magic number with readable sig constant

SIG_ERR is defined as 'pub const SIG_ERR: sighandler_t = !0 as sighandler_t;'
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/unix/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs
index c57751a01d7..854d380d128 100644
--- a/src/libstd/sys/unix/mod.rs
+++ b/src/libstd/sys/unix/mod.rs
@@ -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() {}