about summary refs log tree commit diff
path: root/src/libnative/io/timer_unix.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnative/io/timer_unix.rs')
-rw-r--r--src/libnative/io/timer_unix.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs
index 2c5b7984827..ed218022b2e 100644
--- a/src/libnative/io/timer_unix.rs
+++ b/src/libnative/io/timer_unix.rs
@@ -87,17 +87,17 @@ pub enum Req {
 // returns the current time (in milliseconds)
 pub fn now() -> u64 {
     unsafe {
-        let mut now: libc::timeval = mem::init();
+        let mut now: libc::timeval = mem::zeroed();
         assert_eq!(c::gettimeofday(&mut now, ptr::null()), 0);
         return (now.tv_sec as u64) * 1000 + (now.tv_usec as u64) / 1000;
     }
 }
 
 fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
-    let mut set: c::fd_set = unsafe { mem::init() };
+    let mut set: c::fd_set = unsafe { mem::zeroed() };
 
     let mut fd = FileDesc::new(input, true);
-    let mut timeout: libc::timeval = unsafe { mem::init() };
+    let mut timeout: libc::timeval = unsafe { mem::zeroed() };
 
     // active timers are those which are able to be selected upon (and it's a
     // sorted list, and dead timers are those which have expired, but ownership