mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
vm-allocator: fix a clippy warning on missing safety comments
There is already a comment but Clippy isn't happy with its form. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
d274fe9cb8
commit
3d08a0fba9
@ -19,7 +19,7 @@ use libc::{sysconf, _SC_PAGESIZE};
|
|||||||
/// Safe wrapper for `sysconf(_SC_PAGESIZE)`.
|
/// Safe wrapper for `sysconf(_SC_PAGESIZE)`.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn pagesize() -> usize {
|
fn pagesize() -> usize {
|
||||||
// Trivially safe
|
// SAFETY: FFI call. Trivially safe.
|
||||||
unsafe { sysconf(_SC_PAGESIZE) as usize }
|
unsafe { sysconf(_SC_PAGESIZE) as usize }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user