Date: Sat, 9 Apr 2022 00:27:58 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 9c11e6af89c3 - main - sbni: Use memset to clear flags structure in attach. Message-ID: <202204090027.2390RwYC056717@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204090027.2390RwYC056717>