about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc_system')
-rw-r--r--src/liballoc_system/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index c5e056f6b12..753b6a5e292 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -249,7 +249,7 @@ mod platform {
     }
 
     unsafe fn align_ptr(ptr: *mut u8, align: usize) -> *mut u8 {
-        let aligned = ptr.offset((align - (ptr as usize & (align - 1))) as isize);
+        let aligned = ptr.add(align - (ptr as usize & (align - 1)));
         *get_header(aligned) = Header(ptr);
         aligned
     }