git: d7cd10445841 - stable/13 - sbni: Use memset to clear flags structure in attach.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 13 May 2022 17:58:48 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=d7cd104458416be4c8bb9f07cba68d016182a2fe

commit d7cd104458416be4c8bb9f07cba68d016182a2fe
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-09 00:25:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-13 17:44:36 +0000

    sbni: Use memset to clear flags structure in attach.
    
    NFC, just less nausea-inducing.
    
    (cherry picked from commit 9c11e6af89c3a9c50e52af5fa2645936dc7eff5d)
---
 sys/dev/sbni/if_sbni_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/sbni/if_sbni_pci.c b/sys/dev/sbni/if_sbni_pci.c
index 10af065d22c5..22ae512a7bdc 100644
--- a/sys/dev/sbni/if_sbni_pci.c
+++ b/sys/dev/sbni/if_sbni_pci.c
@@ -137,7 +137,7 @@ sbni_pci_attach(device_t dev)
 		goto attach_failed;
 	}
 
-	*(u_int32_t*)&flags = 0;
+	memset(&flags, 0, sizeof(flags));
 
 	error = sbni_attach(sc, device_get_unit(dev) * 2, flags);
 	if (error) {