about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-20 23:03:09 +0000
committerbors <bors@rust-lang.org>2015-01-20 23:03:09 +0000
commit29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba (patch)
tree98824cc18b1c65ff09f383438d79ad2d0a0e2ea8 /src/liballoc
parent583c5c589ed02e5b6b14a576e35e0ce68988d949 (diff)
parent631896dc1996d239a532b0ce02d5fe886660149e (diff)
downloadrust-29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba.tar.gz
rust-29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba.zip
Auto merge of #21439 - alexcrichton:rollup, r=alexcrichton
Continuation of https://github.com/rust-lang/rust/pull/21428
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/heap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index b7bc1b47646..bd5b43b782e 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -298,7 +298,7 @@ mod imp {
             libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8
         } else {
             let new_ptr = allocate(size, align);
-            ptr::copy_memory(new_ptr, ptr as *const u8, cmp::min(size, old_size));
+            ptr::copy_memory(new_ptr, ptr, cmp::min(size, old_size));
             deallocate(ptr, old_size, align);
             new_ptr
         }