Skip to content

Commit 6488b26

Browse files
authored
more fixing
1 parent 4f77170 commit 6488b26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mem/x86_64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub unsafe fn compare_bytes(a: *const u8, b: *const u8, n: usize) -> i32 {
185185

186186
#[cfg(target_feature = "sse2")]
187187
#[inline(always)]
188-
pub unsafe fn c_string_length(s: *const core::ffi::c_char) -> usize {
188+
pub unsafe fn c_string_length(mut s: *const core::ffi::c_char) -> usize {
189189
use core::arch::x86_64::{__m128i, _mm_cmpeq_epi8, _mm_movemask_epi8, _mm_set1_epi8};
190190

191191
let mut n = 0;
@@ -202,7 +202,7 @@ pub unsafe fn c_string_length(s: *const core::ffi::c_char) -> usize {
202202
n += 1;
203203
s = s.add(1);
204204
}
205-
205+
206206
// Shave of the least significand bits to align the address to a 16
207207
// byte boundary. The shaved of bits are used to correct the first iteration.
208208

0 commit comments

Comments
 (0)