diff --git a/src/header/string/mod.rs b/src/header/string/mod.rs index 0efe60f8c8151b9a155671340868545eb7685b9e..497a2bbeffb857225240a9a2e7cf992a5c944fad 100644 --- a/src/header/string/mod.rs +++ b/src/header/string/mod.rs @@ -82,7 +82,7 @@ pub unsafe extern "C" fn memcmp(s1: *const c_void, s2: *const c_void, n: usize) let c = *(a as *const u8).offset(i as isize); let d = *(b as *const u8).offset(i as isize); if c != d { - return c as i32 - d as i32; + return c as c_int - d as c_int; } } unreachable!() @@ -95,7 +95,7 @@ pub unsafe extern "C" fn memcmp(s1: *const c_void, s2: *const c_void, n: usize) let mut b = b as *const u8; for _ in 0..rem { if *a != *b { - return a as i32 - b as i32; + return a as c_int - b as c_int; } a = a.offset(1); b = b.offset(1);