mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
net_util: add safety comments for impl ByteValued
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
6f49cb2860
commit
8ee253cd3f
@ -42,6 +42,7 @@ pub struct ControlHeader {
|
||||
pub cmd: u8,
|
||||
}
|
||||
|
||||
// SAFETY: ControlHeader only contains a series of integers
|
||||
unsafe impl ByteValued for ControlHeader {}
|
||||
|
||||
pub struct CtrlQueue {
|
||||
|
@ -59,7 +59,7 @@ pub struct VirtioNetConfig {
|
||||
pub duplex: u8,
|
||||
}
|
||||
|
||||
// Safe because it only has data and has no implicit padding.
|
||||
// SAFETY: it only has data and has no implicit padding.
|
||||
unsafe impl ByteValued for VirtioNetConfig {}
|
||||
|
||||
/// Create a sockaddr_in from an IPv4 address, and expose it as
|
||||
|
Loading…
Reference in New Issue
Block a user