about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-05-06 18:53:45 -0700
committerBrian Anderson <banderson@mozilla.com>2013-05-14 14:52:06 -0700
commit101aaa38616411b7fcef0599a3e514cea7df3a87 (patch)
treef78a190eff9f1fad5eb6a48fe342edc09564375c /src/libcore
parentd234cf7e440db0abbf867997c45d993a542ee640 (diff)
downloadrust-101aaa38616411b7fcef0599a3e514cea7df3a87.tar.gz
rust-101aaa38616411b7fcef0599a3e514cea7df3a87.zip
core::rt: 0 is a valid TLS key
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/rt/local_sched.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/rt/local_sched.rs b/src/libcore/rt/local_sched.rs
index 44dbd55373f..e96a2e8de2d 100644
--- a/src/libcore/rt/local_sched.rs
+++ b/src/libcore/rt/local_sched.rs
@@ -119,7 +119,7 @@ fn maybe_tls_key() -> Option<tls::Key> {
         // another thread. I think this is fine since the only action
         // they could take if it was initialized would be to check the
         // thread-local value and see that it's not set.
-        if key != 0 {
+        if key != -1 {
             return Some(key);
         } else {
             return None;