add ptr_offset_by_literal clippy lint and set to deny
This commit is contained in:
@@ -127,12 +127,12 @@ pub unsafe extern "C" fn utimes(path: *const c_char, times: *const timeval) -> c
|
||||
} else {
|
||||
Some([
|
||||
timespec {
|
||||
tv_sec: unsafe { (*times.offset(0)).tv_sec },
|
||||
tv_nsec: c_long::from(unsafe { (*times.offset(0)).tv_usec }) * 1000,
|
||||
tv_sec: unsafe { (*times).tv_sec },
|
||||
tv_nsec: c_long::from(unsafe { (*times).tv_usec }) * 1000,
|
||||
},
|
||||
timespec {
|
||||
tv_sec: unsafe { (*times.offset(1)).tv_sec },
|
||||
tv_nsec: c_long::from(unsafe { (*times.offset(1)).tv_usec }) * 1000,
|
||||
tv_sec: unsafe { (*times.add(1)).tv_sec },
|
||||
tv_nsec: c_long::from(unsafe { (*times.add(1)).tv_usec }) * 1000,
|
||||
},
|
||||
])
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user