net_gen: add a safety comment

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2022-11-16 21:34:26 +00:00 committed by Liu Wei
parent 7f4b5dfae5
commit 926d149881

View File

@ -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() }
}
}