git: 9c11e6af89c3 - main - sbni: Use memset to clear flags structure in attach.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 09 Apr 2022 00:27:58 UTC
The branch main has been updated by jhb:

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

commit 9c11e6af89c3a9c50e52af5fa2645936dc7eff5d
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-09 00:25:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-09 00:25:14 +0000

    sbni: Use memset to clear flags structure in attach.
    
    NFC, just less nausea-inducing.
---
 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 abd24df842a1..774510ef2231 100644
--- a/sys/dev/sbni/if_sbni_pci.c
+++ b/sys/dev/sbni/if_sbni_pci.c
@@ -134,7 +134,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) {