mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45: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)`.
|
||||
#[inline(always)]
|
||||
fn pagesize() -> usize {
|
||||
// Trivially safe
|
||||
// SAFETY: FFI call. Trivially safe.
|
||||
unsafe { sysconf(_SC_PAGESIZE) as usize }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user