Replace i32 with c_int in memcmp
As per the comments from jD91mZM2 on the merge request.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user