diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-06-17 10:52:37 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-06-17 10:52:46 +0000 |
| commit | 7d69d4ced23c446d6af341e3f9dc031a302150fc (patch) | |
| tree | 1d59692c2766091896112e5c4dac1b4f5c8fb02f /src/libstd/sys/wasm | |
| parent | 70456a6cbd67c0547d22997007afaaed0819767e (diff) | |
| download | rust-7d69d4ced23c446d6af341e3f9dc031a302150fc.tar.gz rust-7d69d4ced23c446d6af341e3f9dc031a302150fc.zip | |
Make use of `ptr::null(_mut)` instead of casting zero
Diffstat (limited to 'src/libstd/sys/wasm')
| -rw-r--r-- | src/libstd/sys/wasm/thread_local_atomics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/wasm/thread_local_atomics.rs b/src/libstd/sys/wasm/thread_local_atomics.rs index b408ad0d5c1..3dc0bb24553 100644 --- a/src/libstd/sys/wasm/thread_local_atomics.rs +++ b/src/libstd/sys/wasm/thread_local_atomics.rs @@ -11,7 +11,7 @@ struct ThreadControlBlock { impl ThreadControlBlock { fn new() -> ThreadControlBlock { ThreadControlBlock { - keys: [0 as *mut u8; MAX_KEYS], + keys: [core::ptr::null_mut(); MAX_KEYS], } } |
