mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
net_gen: add a safety comment
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
7f4b5dfae5
commit
926d149881
@ -1187,6 +1187,7 @@ pub struct ifreq {
|
||||
|
||||
impl Default for ifreq {
|
||||
fn default() -> Self {
|
||||
// SAFETY: all zeros is a valid pattern for this data type
|
||||
unsafe { std::mem::zeroed() }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user